Issue Details (XML | Word | Printable)

Key: DIRSERVER-255
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Alex Karasulu
Reporter: Stefan Zoerner
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Directory ApacheDS

Adding a duplicate attribute value should cause an error.

Created: 26/Sep/05 04:35 AM   Updated: 10/Feb/06 12:26 PM
Return to search
Component/s: None
Affects Version/s: pre-1.0
Fix Version/s: 1.0-RC1

Time Tracking:
Not Specified

File Attachments:
  Size
Java Source File Licensed for inclusion in ASF works ModifyAddDuplicateValueTest.java 2005-09-26 04:42 AM Stefan Zoerner 6 kB

Resolution Date: 07/Jan/06 07:28 PM


 Description  « Hide
Adding a duplicate attribute value to an entry with a single modify operation results in an invalid entry. After the operation it contains the parameter value twice. Hence someone is able to change this entry

dn: cn=Heather Nova,ou=system
objectClass: top
objectClass: person
cn: Heather Nova
sn: Nova

into an entry which looks like this:

dn: cn=Heather Nova,ou=system
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: organizationalPerson
cn: Heather Nova
sn: Nova

Expected behavior is LDAP Error code: 20 (Indicates that the attribute value specified in a modify or add operation already exists as a value for that attribute). This is quite similar to DIREVE-241 ("Adding an already existing attribute value with a modify operation does not cause an error."). But in this case, the attribute value is not present before, but is created with a single modify operation with two add changes. OK, it is a little bit bizarre, but other LDAP servers successfully refuse such an operation.

Find attached a test case with two tests, one for an already existing attribute type, and one for a new type (the issue arises in both occasions).

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.