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

        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.
        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.
        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)

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development