Directory ApacheDS
  1. Directory ApacheDS
  2. DIRSERVER-637

Possible to create entry which misses a required attribute

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0-RC3
    • Fix Version/s: 1.0-RC4, 1.5.0
    • 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

      It is possible to create entries which miss required attributes. Here is an example: objectClass person requires a value for sn, but it is possible to import the following entry:

      dn: cn=Fiona Apple,dc=example,dc=com
      objectclass: top
      objectclass: person
      cn: Fiona Apple

      I add a JUnit test class which passes if the expected error (objectClass violation) occurs.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        59d 3h 25m 1 Alex Karasulu 06/Aug/06 03:12
        In Progress In Progress Closed Closed
        1h 44m 1 Alex Karasulu 06/Aug/06 04:56
        Alex Karasulu made changes -
        Fix Version/s 1.0-RC4 [ 12311053 ]
        Fix Version/s 1.1.0 [ 12310790 ]
        Status In Progress [ 3 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Hide
        Alex Karasulu added a comment -

        Committed fixes in revisions 429101 (1.0 branch) and 429102 (1.1 branch)

        Show
        Alex Karasulu added a comment - Committed fixes in revisions 429101 (1.0 branch) and 429102 (1.1 branch)
        Alex Karasulu made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Alex Karasulu made changes -
        Assignee Alex Karasulu [ akarasulu ]
        Ersin Er made changes -
        Hide
        Ersin Er added a comment -

        This simple patch (hopefully) solves the problem mentioned. This is a quick fix and only solves the problem for add operation. I have not been involved in the schema system before so it may not a a refined solution. However it should work (as tested locally). If it's OK, I can also apply it to the repository.

        Show
        Ersin Er added a comment - This simple patch (hopefully) solves the problem mentioned. This is a quick fix and only solves the problem for add operation. I have not been involved in the schema system before so it may not a a refined solution. However it should work (as tested locally). If it's OK, I can also apply it to the repository.
        Stefan Zoerner made changes -
        Field Original Value New Value
        Attachment AddWithMissingAttributes.java [ 12335152 ]
        Hide
        Stefan Zoerner added a comment -

        This JUnit test creates an invalid person entry as described in the issue with the help of JNDI and its LDAP provider.

        Show
        Stefan Zoerner added a comment - This JUnit test creates an invalid person entry as described in the issue with the help of JNDI and its LDAP provider.
        Stefan Zoerner created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development