-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
We should not pass the user input directly to LDAP, but rather use https://www.python-ldap.org/en/latest/reference/ldap-filter.html#ldap.filter.escape_filter_chars to prevent any unwanted attack.
Example of how it should be done:
import ldap
from ldap.filter import escape_filter_chars
search_filter = f"(mail={escape_filter_chars(email)})"
results = conn.search_s(BASE_DN, ldap.SCOPE_SUBTREE, search_filter)Please read more about it and try to fix it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels