You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(error: LDAP Result Code 201 "Filter Compile Error": ldap: invalid characters for escape in filter: encoding/hex: invalid byte: U+002B '+')
Another example: (&(objectCategory=group)(objectClass=group)(memberOf=CN=Main (Example),OU=Groups,DC=example,DC=foo,DC=bar)) (error: LDAP Result Code 201 "Filter Compile Error": ldap: finished compiling filter with extra at end: OU=Groups,DC=example,DC=foo,DC=bar))
I have discovered that the CompileFilter does not process the filter string correctly, and requires the special characters to be converted to \xx hex values of the ascii characters first.
Example: (&(objectCategory=group)(objectClass=group)(memberOf=CN=Main\+,OU=Groups,DC=example,DC=foo,DC=bar)) needs to be converted to (&(objectCategory=group)(objectClass=group)(memberOf=CN=Main\5c\2b,OU=Groups,DC=example,DC=foo,DC=bar))
(&(objectCategory=group)(objectClass=group)(memberOf=CN=Main (Example),OU=Groups,DC=example,DC=foo,DC=bar)) needs to be converted to (&(objectCategory=group)(objectClass=group)(memberOf=CN=Main \28Example\29,OU=Groups,DC=example,DC=foo,DC=bar))
I would suggest that a parsing method be added to convert special characters within a DN search string to hex values within the CompileFilter method.
The text was updated successfully, but these errors were encountered:
Search
is unable to handle DN filter strings that contain special characters. Example:(error: LDAP Result Code 201 "Filter Compile Error": ldap: invalid characters for escape in filter: encoding/hex: invalid byte: U+002B '+')
Another example:
(&(objectCategory=group)(objectClass=group)(memberOf=CN=Main (Example),OU=Groups,DC=example,DC=foo,DC=bar))
(error: LDAP Result Code 201 "Filter Compile Error": ldap: finished compiling filter with extra at end: OU=Groups,DC=example,DC=foo,DC=bar))
I have discovered that the
CompileFilter
does not process the filter string correctly, and requires the special characters to be converted to \xx hex values of the ascii characters first.Example:
(&(objectCategory=group)(objectClass=group)(memberOf=CN=Main\+,OU=Groups,DC=example,DC=foo,DC=bar))
needs to be converted to(&(objectCategory=group)(objectClass=group)(memberOf=CN=Main\5c\2b,OU=Groups,DC=example,DC=foo,DC=bar))
(&(objectCategory=group)(objectClass=group)(memberOf=CN=Main (Example),OU=Groups,DC=example,DC=foo,DC=bar))
needs to be converted to(&(objectCategory=group)(objectClass=group)(memberOf=CN=Main \28Example\29,OU=Groups,DC=example,DC=foo,DC=bar))
I would suggest that a parsing method be added to convert special characters within a DN search string to hex values within the
CompileFilter
method.The text was updated successfully, but these errors were encountered: