Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-3054

ldapmodify silently discards duplicate values

    Details

    • Type: Bug
    • Status: Dev backlog
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.0.0, 3.0.0, 2.6.4, 2.6.3
    • Fix Version/s: None
    • Component/s: tools
    • Labels:
    • Support Ticket IDs:

      Description

      A multi-valued attribute is changed during a modification, if one value contains the same value plus a Unicode SOFT HYPHEN character.

      The behavior is different between 2.x and 3/4.x.

      Example LDIF modification:

      dn: uid=user.0,ou=people,dc=example,dc=com
      changetype: modify
      replace: givenName
      givenName:: U29maWE=
      givenName:: U29macKtYQ==
      

      Note: In the second decoded value, an "-" character was added for the example only. Pasting the UTF8 character always removes it from Jira editors.

      opendj; bin/$ echo U29maWE= | base64 -D ; echo
      Sofia
      opendj; bin/$ echo U29macKtYQ== | base64 -D ; echo
      SofiĀ­-a
      

      When applying the modification in 2.6.4:

      ldapmodify -h localhost -p 1389 -w password -X -D "cn=Directory Manager" --filename user0.ldif
      Processing MODIFY request for uid=user.0,ou=people,dc=example,dc=com
      MODIFY operation successful for DN uid=user.0,ou=people,dc=example,dc=com
      

      ldapmodify drops the second givenName value with the SOFT HYPHEN character:

      ./ldapsearch -h localhost -p 1389 -D cn=Directory Manager -w password -b dc=example,dc=com (uid=user.0) dn uid givenName
      dn: uid=user.0,ou=People,dc=example,dc=com
      uid: user.0
      givenName: Sofie
      
      ./ldapmodify -h localhost -p 1389 -D cn=Directory Manager -w password -f ./user0.ldif
      Processing MODIFY request for uid=user.0,ou=people,dc=example,dc=com
      MODIFY operation successful for DN uid=user.0,ou=people,dc=example,dc=com
      
      ./ldapsearch -h localhost -p 1389 -D cn=Directory Manager -w password -b dc=example,dc=com (uid=user.0) dn uid givenName
      dn: uid=user.0,ou=People,dc=example,dc=com
      uid: user.0
      givenName: Sofia
      

      However ldapmodify in 3.0.0/4.0.0 drops the first givenName value without the SOFT HYPHEN character.

      ./ldapsearch -h localhost -p 1389 -D cn=Directory Manager -w password -b dc=example,dc=com (uid=user.0) dn uid givenName
      dn: uid=user.0,ou=People,dc=example,dc=com
      uid: user.0
      givenName: Sofia
      
      ./ldapmodify -h localhost -p 1389 -D cn=Directory Manager -w password -f ./user0.ldif
      Processing MODIFY request for uid=user.0,ou=people,dc=example,dc=com
      MODIFY operation successful for DN uid=user.0,ou=people,dc=example,dc=com
      
      ./ldapsearch -h localhost -p 1389 -D cn=Directory Manager -w password -b dc=example,dc=com (uid=user.0) dn uid givenName
      dn: uid=user.0,ou=People,dc=example,dc=com
      uid: user.0
      givenName:: U29macKtYQ==
      
      opendj; bin/$ echo 'U29macKtYQ==' | base64 -D ; echo
      SofiĀ­-a
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                matthew Matthew Swift
                Reporter:
                lee.trujillo Lee Trujillo
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: