Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 38967 invoked from network); 17 Jan 2007 19:12:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Jan 2007 19:12:51 -0000 Received: (qmail 59698 invoked by uid 500); 17 Jan 2007 19:12:57 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 59661 invoked by uid 500); 17 Jan 2007 19:12:57 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 59650 invoked by uid 99); 17 Jan 2007 19:12:57 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jan 2007 11:12:57 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jan 2007 11:12:50 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 03B157141D1 for ; Wed, 17 Jan 2007 11:12:30 -0800 (PST) Message-ID: <20570911.1169061149990.JavaMail.jira@brutus> Date: Wed, 17 Jan 2007 11:12:29 -0800 (PST) From: "Stefan Zoerner (JIRA)" To: dev@directory.apache.org Subject: [jira] Commented: (DIRSERVER-823) Problem decoding search filter In-Reply-To: <1446178.1168454307893.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DIRSERVER-823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465507 ] 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): (&(objectClass=person)(|(cn=Kylie*)(sn=Bush))) (&(|(cn=Kylie*)(sn=Bush))(objectClass=person)) 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))) (&(objectClass=person)(|(cn=Kylie*)(sn=Minogue))) (|(cn=Kylie*)(sn=Bush)) (&(objectClass=person)(|(sn=Bush)(cn=Kylie*))) > Problem decoding search filter > ------------------------------ > > Key: DIRSERVER-823 > URL: https://issues.apache.org/jira/browse/DIRSERVER-823 > 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: DIRSERVER823Test.java > > > 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: > http://groups-beta.google.com/group/safehaus/browse_thread/thread/5100becc932fad8c > 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/SearchRequest.java, 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: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira