You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Ed Roberts (JIRA)" <ji...@apache.org> on 2006/11/23 16:57:02 UTC

[jira] Created: (DIRSERVER-785) When searching the directory with broken search expressions the search never returns (infinite loop)

When searching the directory with broken search expressions the search never returns (infinite loop)
----------------------------------------------------------------------------------------------------

                 Key: DIRSERVER-785
                 URL: http://issues.apache.org/jira/browse/DIRSERVER-785
             Project: Directory ApacheDS
          Issue Type: Improvement
    Affects Versions: 1.0
         Environment: Windows 2000, JDK 1.4.2_03 
            Reporter: Ed Roberts
            Priority: Minor


I executed a search on a context and the search did not return.

2006-11-23 15:20:18,243 DEBUG [MYLDAPClientClass]function - searching : filter [(&(cn=somerandomstring)(objectClass=RakInstanceDescriptor)]

I noticed from my debug that my search filter was not terminated correctly. It would make development easier, especially for those not knowing immediately that they had provided a duff filter, if the search method threw an exception to say that the filter was invalid.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Reopened: (DIRSERVER-785) When searching the directory with broken search expressions the search never returns (infinite loop)

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-785?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny reopened DIRSERVER-785:
-----------------------------------------


After having read the issue again, I realised that it was a real problem when using an embedded server, not a problem when using a remote server.

We have to provide a safer parser for filters.

> When searching the directory with broken search expressions the search never returns (infinite loop)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-785
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-785
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 1.5.4
>         Environment: Windows 2000, JDK 1.4.2_03 
>            Reporter: Ed Roberts
>            Assignee: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 1.5.5
>
>
> I executed a search on a context and the search did not return.
> 2006-11-23 15:20:18,243 DEBUG [MYLDAPClientClass]function - searching : filter [(&(cn=somerandomstring)(objectClass=RakInstanceDescriptor)]
> I noticed from my debug that my search filter was not terminated correctly. It would make development easier, especially for those not knowing immediately that they had provided a duff filter, if the search method threw an exception to say that the filter was invalid.

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


[jira] Updated: (DIRSERVER-785) When searching the directory with broken search expressions the search never returns (infinite loop)

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-785?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny updated DIRSERVER-785:
----------------------------------------

    Affects Version/s:     (was: 1.0)
                       1.5.4
        Fix Version/s: 1.5.5

> When searching the directory with broken search expressions the search never returns (infinite loop)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-785
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-785
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 1.5.4
>         Environment: Windows 2000, JDK 1.4.2_03 
>            Reporter: Ed Roberts
>            Assignee: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 1.5.5
>
>
> I executed a search on a context and the search did not return.
> 2006-11-23 15:20:18,243 DEBUG [MYLDAPClientClass]function - searching : filter [(&(cn=somerandomstring)(objectClass=RakInstanceDescriptor)]
> I noticed from my debug that my search filter was not terminated correctly. It would make development easier, especially for those not knowing immediately that they had provided a duff filter, if the search method threw an exception to say that the filter was invalid.

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


[jira] Resolved: (DIRSERVER-785) When searching the directory with broken search expressions the search never returns (infinite loop)

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-785?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny resolved DIRSERVER-785.
-----------------------------------------

    Resolution: Fixed

It seems to be fixed. I just have added a test to check that broken filters throw the correct exception (InvalidSearchFilterException) : http://svn.apache.org/viewvc?rev=695143&view=rev

> When searching the directory with broken search expressions the search never returns (infinite loop)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-785
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-785
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 1.5.4
>         Environment: Windows 2000, JDK 1.4.2_03 
>            Reporter: Ed Roberts
>            Assignee: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 1.5.5
>
>
> I executed a search on a context and the search did not return.
> 2006-11-23 15:20:18,243 DEBUG [MYLDAPClientClass]function - searching : filter [(&(cn=somerandomstring)(objectClass=RakInstanceDescriptor)]
> I noticed from my debug that my search filter was not terminated correctly. It would make development easier, especially for those not knowing immediately that they had provided a duff filter, if the search method threw an exception to say that the filter was invalid.

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


[jira] Closed: (DIRSERVER-785) When searching the directory with broken search expressions the search never returns (infinite loop)

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-785?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny closed DIRSERVER-785.
---------------------------------------


closed

> When searching the directory with broken search expressions the search never returns (infinite loop)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-785
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-785
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 1.5.4
>         Environment: Windows 2000, JDK 1.4.2_03 
>            Reporter: Ed Roberts
>            Assignee: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 1.5.5
>
>
> I executed a search on a context and the search did not return.
> 2006-11-23 15:20:18,243 DEBUG [MYLDAPClientClass]function - searching : filter [(&(cn=somerandomstring)(objectClass=RakInstanceDescriptor)]
> I noticed from my debug that my search filter was not terminated correctly. It would make development easier, especially for those not knowing immediately that they had provided a duff filter, if the search method threw an exception to say that the filter was invalid.

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


[jira] Resolved: (DIRSERVER-785) When searching the directory with broken search expressions the search never returns (infinite loop)

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DIRSERVER-785?page=all ]

Emmanuel Lecharny resolved DIRSERVER-785.
-----------------------------------------

    Resolution: Won't Fix
      Assignee: Emmanuel Lecharny

This would be a very interesting feature, but it's totally impossible to implement it.

The reason is that the server don't receive the filter the way you write it. The LdapProtocol for a Search Request is a binary protocol, not a textual one, and the search filter is written this way for your request :

(&(cn=somerandomstring)(objectClass=RakInstanceDescriptor)) 

is translated to :

0xA0 
  0xA3 0x16
    0x04 0x02 'c'n'
    0x04 0x10 'somerandomstring'
  0xA3 0x24
    0x04 0x0B 'objectClass'
    0x04 0x15 'RakInstanceDescriptor'

This is the client side parser which should be fixed...

Ok, now, if you use the shared-ldap API to parse the filter, then we have a problem, but this is another JIRA :)


> When searching the directory with broken search expressions the search never returns (infinite loop)
> ----------------------------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-785
>                 URL: http://issues.apache.org/jira/browse/DIRSERVER-785
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 1.0
>         Environment: Windows 2000, JDK 1.4.2_03 
>            Reporter: Ed Roberts
>         Assigned To: Emmanuel Lecharny
>            Priority: Minor
>
> I executed a search on a context and the search did not return.
> 2006-11-23 15:20:18,243 DEBUG [MYLDAPClientClass]function - searching : filter [(&(cn=somerandomstring)(objectClass=RakInstanceDescriptor)]
> I noticed from my debug that my search filter was not terminated correctly. It would make development easier, especially for those not knowing immediately that they had provided a duff filter, if the search method threw an exception to say that the filter was invalid.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira