Make sure LDAP filter strings are properly escaped.

Use python LDAP module's built-in escape function.