directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DIRSERVER-1180) NPE and hanging search request when using a filter with empty substring sequence
Date Tue, 08 Jul 2008 15:00:32 GMT

    [ https://issues.apache.org/jira/browse/DIRSERVER-1180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12611635#action_12611635
] 

Emmanuel Lecharny commented on DIRSERVER-1180:
----------------------------------------------

After having debugged the sserver, here is what is happening :

The PDU is incorrect. It contains those bytes :
A4 06  // A substring filter, length 6
  04 02 C N // The attribute being filtered (cn)
  30 00  // No initial, no Any and no final. This is totally wrong.

1) JNDI don't parser invalid filters correctly, so it sends bad PDU
2) The bad PDU is correctly handled by the decoder, which corretcly throws a DecodingException
3) The LdapServer ProtocolHandler exceptionCautgh method is supposed to send back a message

This is where things get tricky. The response iss null, so MINA does not send back any kind
of message, and the client is waiting forever for a response.

The correct way to handle this case is to close the session, sending back a ProtocolError
message (as requested by the LDAP protocl, when the PDU is incorrect).

> NPE and hanging search request when using a filter with empty substring sequence
> --------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-1180
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1180
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.3, 1.5.2
>            Reporter: Stefan Seelmann
>            Assignee: Emmanuel Lecharny
>            Priority: Blocker
>             Fix For: 1.5.3
>
>
> When starting a search request using the seachfilter (cn=**) the request lasts forever.
I testet with JNDI and ldapsearch command. 
> Here is the server log:
> [00:22:01] ERROR [org.apache.directory.shared.ldap.codec.actions.StoreAnyAction] - The
substring any filter is empty
> [00:22:01] WARN [org.apache.directory.server.ldap.LdapServer$LdapProtocolHandler] - [/127.0.0.1:47315]
Unexpected exception from exceptionCaught handler.
> java.lang.NullPointerException: message
> 	at org.apache.mina.common.IoFilter$WriteRequest.<init>(IoFilter.java:333)
> 	at org.apache.mina.common.support.BaseIoSession.write(BaseIoSession.java:177)
> 	at org.apache.mina.common.support.BaseIoSession.write(BaseIoSession.java:168)
> 	at org.apache.directory.server.ldap.LdapServer$LdapProtocolHandler.exceptionCaught(LdapServer.java:1104)
> 	at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.exceptionCaught(AbstractIoFilterChain.java:564)
> 	at org.apache.mina.common.support.AbstractIoFilterChain.callNextExceptionCaught(AbstractIoFilterChain.java:345)
> 	at org.apache.mina.common.support.AbstractIoFilterChain.access$1000(AbstractIoFilterChain.java:53)
> 	at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.exceptionCaught(AbstractIoFilterChain.java:643)
> 	at org.apache.mina.common.IoFilterAdapter.exceptionCaught(IoFilterAdapter.java:75)
> 	at org.apache.mina.common.support.AbstractIoFilterChain.callNextExceptionCaught(AbstractIoFilterChain.java:345)
> 	at org.apache.mina.common.support.AbstractIoFilterChain.access$1000(AbstractIoFilterChain.java:53)
> 	at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.exceptionCaught(AbstractIoFilterChain.java:643)
> 	at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:224)
> 	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)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message