directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Endi S. Dewata" <>
Subject Filter parsing problem
Date Tue, 09 Jan 2007 01:14:01 GMT

Someone reported a problem with the filter parsing:

I was able to reproduce the problem on ApacheDS 1.0.0:

    ldapsearch -h localhost -p 10389 -D uid=admin,ou=system -w secret -x
    -b "dc=Example,dc=com" "(|(cn=a)(&(sn=b)(sn=c*)(sn=d)))"

Here's the debug output:


Message received :     SearchRequest
        baseDn : 'dc=Example,dc=com'
        filter : '(| (cn=a) (& (sn=b) (sn=c*) ) (sn=d) ) '
        scope : whole subtree
        typesOnly : false
no limit
        Time Limit : no limit
        Deref Aliases : never Deref Aliases
        attributes :

Notice that the position of the parenthesises has changed.

Original filter: (|(cn=a)(&(sn=b)(sn=c*)(sn=d)))
Parsed filter  : (|(cn=a)(&(sn=b)(sn=c*))(sn=d))

If the '*' is removed, it will work just fine. Similar problem happens if
the operators are switched:

Original filter: (&(cn=a)(|(sn=b)(sn=c*)(sn=d)))
Parsed filter  : (&(cn=a)(|(sn=b)(sn=c*))(sn=d))

I'm having problems building ApacheDS from the source code, so I can't check
whether this problem still exists in the latest code. Could someone verify
this? Has this problem been reported in JIRA? Thanks a lot.

Endi S. Dewata

View raw message