Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 17428 invoked from network); 7 Oct 2008 22:05:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Oct 2008 22:05:13 -0000 Received: (qmail 10187 invoked by uid 500); 7 Oct 2008 22:05:04 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 10113 invoked by uid 500); 7 Oct 2008 22:05:04 -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 10098 invoked by uid 99); 7 Oct 2008 22:05:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Oct 2008 15:05:04 -0700 X-ASF-Spam-Status: No, hits=-1999.9 required=10.0 tests=ALL_TRUSTED,DNS_FROM_SECURITYSAGE X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Oct 2008 22:04:08 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 68452234C226 for ; Tue, 7 Oct 2008 15:04:44 -0700 (PDT) Message-ID: <109697347.1223417084425.JavaMail.jira@brutus> Date: Tue, 7 Oct 2008 15:04:44 -0700 (PDT) From: "Emmanuel Lecharny (JIRA)" To: dev@directory.apache.org Subject: [jira] Resolved: (DIRSERVER-1275) Possible bug when searching with an empty filter In-Reply-To: <1391049893.1223412764439.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-1275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emmanuel Lecharny resolved DIRSERVER-1275. ------------------------------------------ Resolution: Invalid This is a problem with Python Ldap implementation which does not generate a correct PDU. The server correctly reject the request because there is no filter in it, when it's a mandatory field. > Possible bug when searching with an empty filter > ------------------------------------------------ > > Key: DIRSERVER-1275 > URL: https://issues.apache.org/jira/browse/DIRSERVER-1275 > Project: Directory ApacheDS > Issue Type: Bug > Components: asn1 > Affects Versions: 1.5.4 > Reporter: Rui Lopes > > I'm not sure if this is a bug, but still, I'm going to report it as such. > When I try to do a search using python-ldap: > import ldap > l = ldap.initialize('ldap://localhost:10389') > l.simple_bind_s('uid=admin,ou=system', 'secret') > l.search_s('', ldap.SCOPE_BASE, "", ('vendorName', 'vendorVersion')) > NB: the empty string "" is normally "(objectClass=*)", but for this bug to happen, pass an empty string, or even "()". > This is was I get in the AD logs: > [21:21:42] ERROR [org.apache.directory.shared.asn1.ber.grammar.AbstractGrammar] - Bad transition from state TYPES_ONLY_STATE, tag 0x30 > [21:21:42] WARN [org.apache.directory.server.ldap.LdapProtocolHandler] - [/127.0.0.1:39441] Unexpected exception forcing session to close: sending disconnect notice to client. > org.apache.mina.filter.codec.ProtocolDecoderException: org.apache.directory.shared.ldap.message.ResponseCarryingMessageException: Bad transition ! (Hexdump: 30 33 02 01 0B 63 2E 04 00 0A 01 00 0A 01 00 02 01 00 02 01 00 01 01 00 30 1B 04 0A 76 65 6E 64 6F 72 4E 61 6D 65 04 0D 76 65 6E 64 6F 72 56 65 72 73 69 6F 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00) > at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:165) > at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299) > at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53) > at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648) > at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:220) > at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:264) > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) > at java.lang.Thread.run(Thread.java:636) > Caused by: org.apache.directory.shared.ldap.message.ResponseCarryingMessageException: Bad transition ! > at org.apache.directory.shared.ldap.message.MessageDecoder.decode(MessageDecoder.java:165) > at org.apache.directory.shared.asn1.codec.Asn1CodecDecoder.decode(Asn1CodecDecoder.java:53) > at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:158) > ... 8 more > [21:21:42] WARN [org.apache.directory.server.ldap.LdapProtocolHandler] - Null LdapSession given to cleanUpSession. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.