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.

Reply via email to