Directory ApacheDS
  1. Directory ApacheDS
  2. DIRSERVER-642

Searches with quotes in the search base do not work as expected.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0-RC3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      ApacheDS 1.0 RC 3
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
      Microsoft Windows XP version 5.1 Service Pack 1

      Description

      Searches with quotes in the search base do not work as expected. I have a created a person entry:

      dn: cn=Kylie Minogue,dc=example,dc=com
      objectclass: top
      objectclass: person
      sn: Minogue
      cn: Kylie Minogue

      and try to find it with the following search parameters:

      BASE DN: cn="Kylie Minogue",dc=example,dc=com
      Filter: (cn=Kylie Minogue)
      Scope: BASE

      No entry is found in ApacheDS 1.0 RC3. But RFC 2253 (Lightweight Directory Access Protocol (v3): UTF-8 String Representation of Distinguished Names) requires that implementations must allow a value to be surrounded by quote ('"' ASCII 34) characters, which are not part of the value (Chapter 4. Relationship with RFC 1779 and LDAPv2).

      I have created a JUnit test which imitates the search with the help of JNDI (attached). It works with Sun Java System Directory Server 5.2 and IBM Tivoli Directory Server 6.0.

        Activity

        Hide
        Alex Karasulu added a comment -

        Looks like this was closed. Sorry I assigned it to me.

        Show
        Alex Karasulu added a comment - Looks like this was closed. Sorry I assigned it to me.
        Hide
        Stefan Zoerner added a comment -

        I have retetested the problem on the current optimization branch (Revision 427216) and I can confirm that it is fixed. Well done, Emmanuel! I'll close the issue when the code is merged in the 1.0 branch.

        Show
        Stefan Zoerner added a comment - I have retetested the problem on the current optimization branch (Revision 427216) and I can confirm that it is fixed. Well done, Emmanuel! I'll close the issue when the code is merged in the 1.0 branch.
        Hide
        Emmanuel Lecharny added a comment -

        Fixed !!!

        This was quite a harsh... LdapDN has been totally transformed to handle this case, and many others.

        The result is quite interesting :

        • LdapDN parsing is around 35% faster than the previous version
        • and it need far less memory, too, so the GC is launched less.
        Show
        Emmanuel Lecharny added a comment - Fixed !!! This was quite a harsh... LdapDN has been totally transformed to handle this case, and many others. The result is quite interesting : LdapDN parsing is around 35% faster than the previous version and it need far less memory, too, so the GC is launched less.
        Hide
        Stefan Zoerner added a comment -

        Here is a little reminder for an additional comment in RFC 2253 (same place as cite in issue description above):

        Inside the quoted value, the following characters can occur without any escaping: ",", "=", "+", "<", ">", "#" and ";"

        I hope it will not make it too difficult to implement ...

        Show
        Stefan Zoerner added a comment - Here is a little reminder for an additional comment in RFC 2253 (same place as cite in issue description above): Inside the quoted value, the following characters can occur without any escaping: ",", "=", "+", "<", ">", "#" and ";" I hope it will not make it too difficult to implement ...
        Hide
        Emmanuel Lecharny added a comment -

        sheot... I missed this one.

        LdapDN will be modified to accept those kind of entries.

        Thanks Stefan !

        Show
        Emmanuel Lecharny added a comment - sheot... I missed this one. LdapDN will be modified to accept those kind of entries. Thanks Stefan !
        Hide
        Stefan Zoerner added a comment -

        JUnit test case to demonstrate DIRSERVER-642, uses JNDI and its LDAP provider to connect to the server.

        Show
        Stefan Zoerner added a comment - JUnit test case to demonstrate DIRSERVER-642 , uses JNDI and its LDAP provider to connect to the server.

          People

          • Assignee:
            Emmanuel Lecharny
            Reporter:
            Stefan Zoerner
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development