Menu

Filter does not take white space after operators?

2013-12-04
2013-12-04
  • Sashanka Dwivedula

    We've encountered an issue while trying to create a filter which has some whitespace following an operator such as the '&' or the '|'. The Filter parser throws an LDAPException expecting an open parenthesis to follow directly after instead of ignoring the white space. So for e.g. a valid filter such as:
    (| (memberof=CN=testGroup1,OU=FilterTest,DC=AD-2k8,DC=local)(memberof=CN=testGroup2,OU=FilterTest,DC=AD-2k8,DC=local))

    fails to parse. This also fails to parse if there's white space between the arguments to the operator. Has anyone else encountered a similar issue? Is it fixed in the latest version? We're currently using 2.3.4, but I have not seen any release notes indicating that this was an issue or has been fixed in the latest version.

    Thanks
    -Sashanka

     
  • Neil Wilson

    Neil Wilson - 2013-12-04

    The LDAP SDK doesn't accept this because it's not valid. The specification for the string representation of search filters (RFC 4515) doesn't allow any extraneous spaces.

     

Log in to post a comment.