directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Zoerner (JIRA)" <>
Subject [jira] Commented: (DIRSERVER-823) Problem decoding search filter
Date Wed, 17 Jan 2007 19:12:29 GMT


Stefan Zoerner commented on DIRSERVER-823:

I was able to reproduce the problem and I have created a JUnit test for it (find it attached).
The test adds a person entry to the example partitions and performs several search operations.
The entry looks like this

dn: cn=Kylie Minogue,dc=example,dc=com
sn: Minogue
cn: Kylie Minogue
objectclass: person
objectclass: top

The following filters (base=dc=example,dc=com, scope=sub) do not match this entry (as the
test case detects):


although they should (test case verified with OpenLDAP and others). On the other hand, the
following similar filters perfectly work (Endi's observation with the asterisk is interesting,
thanks for the hint ...)

    (&(objectClass=person)(|(cn=Kylie Minogue)(sn=Bush)))

> Problem decoding search filter
> ------------------------------
>                 Key: DIRSERVER-823
>                 URL:
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.0.1, 1.5.0, 1.0
>            Reporter: Endi S. Dewata
>            Priority: Critical
>         Attachments:
> ApacheDS is having a problem decoding certain LDAP search filters involving nested filters
and substring filter from LDAP Message.
> This problem was originally reported here:
> This problem can be reproduced in ApacheDS 1.0.0, 1.0.1, and 1.5.0.
> Steps to reproduce:
> 1. Edit org/apache/directory/shared/ldap/codec/search/, add the following
at the end
>     of unstackFilters() method (line 430):
>         System.out.println("Filter: "+filter);
> 2. Compile and start ApacheDS server.
> 3. Run the following search:
>     ldapsearch -h localhost -p 10389 -D uid=admin,ou=system -w secret -x
>     -b "dc=Example,dc=com" "(&(mail=a)(|(cn=b*)(sn=c)))"
> Here's the output:
> Filter: &(mail=a)
> Filter: &(mail=a)(|(b*))
> Filter: &(mail=a)(|(b*))(sn=c)
> Notice that the position of the parenthesises has changed. If the '*' is removed, it
will work just fine.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message