Directory ApacheDS
  1. Directory ApacheDS
  2. DIRSERVER-1311

Entry with an escaped comma in DN not found in searches with some filters

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.5.4
    • Fix Version/s: 1.5.5
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows XP
      Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
      ApacheDS 1.5.4

      Description

      I use an out of the box ApacheDS 1.5.4 with server.xml unchanged, context entry for dc=example,dc=com created.

      Adding the following entry is successful (LDIF import)

      dn: cn=Amos\,Tori,dc=example,dc=com
      sn: Amos
      objectClass: person
      objectClass: top
      cn: Tori Amos

      If I perform searches, some find it, for instance:

      $ ldapsearch -D "uid=admin,ou=system" -w secret -h localhost -p 10389 -b "dc=example,dc=com" -s one "(objectclass=person)"
      version: 1
      dn: cn=Amos\,Tori,dc=example,dc=com
      objectClass: person
      objectClass: top
      cn: Tori Amos
      cn: Amos\,Tori
      sn: Amos
      $

      But the following fails (no entry found):

      $ ldapsearch -D "uid=admin,ou=system" -w secret -h localhost -p 10389 -b "dc=example,dc=com" -s one "(cn=Amos,Tori)"
      $

      According to Open Group's compliance tests, it should return the entry. I have tried to verify this by reading RFC 2253 and RFC 4514, esacping with a bachslash is allowed (I am not 100% certain about the filter ...).

      Note that this one here does not return an entry either.

      $ ldapsearch -D "uid=admin,ou=system" -w secret -h localhost -p 10389 -b "dc=example,dc=com" -s one "(cn=Amos\,Tori)"
      $

      1. tori.ldif
        0.1 kB
        Stefan Zoerner

        Activity

        Stefan Zoerner created issue -
        Stefan Zoerner made changes -
        Field Original Value New Value
        Environment   
        « Hide
        Windows XP
        Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
        ApacheDS 1.5.4
        Windows XP
        Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
        ApacheDS 1.5.4
        Hide
        Stefan Zoerner added a comment -

        LDIF file with test data

        Show
        Stefan Zoerner added a comment - LDIF file with test data
        Stefan Zoerner made changes -
        Attachment tori.ldif [ 12399854 ]
        Stefan Seelmann made changes -
        Assignee Stefan Seelmann [ seelmann ]
        Stefan Seelmann made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        Stefan Seelmann added a comment -

        The problem is that the user provided RDN value "Amos\,Tori" (including the backslash) is added to the entry's attributes. However the unescaped value must be added.

        Show
        Stefan Seelmann added a comment - The problem is that the user provided RDN value "Amos\,Tori" (including the backslash) is added to the entry's attributes. However the unescaped value must be added.
        Hide
        Stefan Seelmann added a comment -

        For the add operation the SchemaInterceptor class handles the case when the RDN attribute+value isn't included in the entry's attributes and adds this attribute+value in that case.

        On the other side, for the rename operation, the missing RDN attribute+value is added in the JdbmStore class.

        My question is: where is the better place to handle such stuff? I think it would be better to handle it in the SchemInterceptor because when it is handled in the Store then it must be re-implemented for each Store.

        Show
        Stefan Seelmann added a comment - For the add operation the SchemaInterceptor class handles the case when the RDN attribute+value isn't included in the entry's attributes and adds this attribute+value in that case. On the other side, for the rename operation, the missing RDN attribute+value is added in the JdbmStore class. My question is: where is the better place to handle such stuff? I think it would be better to handle it in the SchemInterceptor because when it is handled in the Store then it must be re-implemented for each Store.
        Hide
        Emmanuel Lecharny added a comment -

        IMO, the place to handle such cases should be the NormalizationInterceptor. Everything after this interceptor should be considered as normalized values.

        Show
        Emmanuel Lecharny added a comment - IMO, the place to handle such cases should be the NormalizationInterceptor. Everything after this interceptor should be considered as normalized values.
        Show
        Stefan Seelmann added a comment - Fixed here: http://svn.apache.org/viewvc?rev=771954&view=rev
        Stefan Seelmann made changes -
        Resolution Fixed [ 1 ]
        Status In Progress [ 3 ] Resolved [ 5 ]
        Fix Version/s 1.5.5 [ 12313148 ]
        Fix Version/s 2.0.0-RC1 [ 12313387 ]
        Emmanuel Lecharny made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        83d 19h 39m 1 Stefan Seelmann 04/May/09 17:07
        In Progress In Progress Resolved Resolved
        1d 2h 23m 1 Stefan Seelmann 05/May/09 19:30
        Resolved Resolved Closed Closed
        587d 18h 6m 1 Emmanuel Lecharny 14/Dec/10 12:37

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development