How should I escape commas in Active Directory filters?
问题 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 error. From my testing, the comma in the CN seems to be the culprit, even though I escaped it with a backslash ( \ ). But, comma isn