How should I escape ldap special characters?
How should I escape ldap special characters? Question: I’m using python-ldap to query Active Directory I have this DN CN=Whalen, Sean,OU=Users,OU=Users and Groups,DC=example,DC=net That works fine as a base in a query, but if I try to use it in a search filter like this (&(objectClass=group)(memberof:1.2.840.113556.1.4.1941:=CN=Whalen, Sean,OU=Users,OU=Users and Groups,DC=example,DC=net)) I get a Bad search filter …