Issue Details (XML | Word | Printable)

Key: DIRSERVER-378
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

Compare operation on non existing or invalid attributes causes wrong return codes

Created: 16/Aug/05 04:25 AM   Updated: 10/Feb/06 12:34 PM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Java Source File BasicCompareTests.java 2005-08-16 04:42 AM Stefan Zoerner 4 kB
Issue Links:
Reference
 

Resolution Date: 25/Aug/05 07:14 AM


 Description  « Hide
If a compare is executed on an entry, and the attribute used in this operation does not occur in the entry, or is unknown to the schema at all, this normally leads to an error.

Two error codes are common here:
16: noSuchAttribute (leads to an NoSuchAttributeException in JNDI)
17: undefinedAttributeType (InvalidAttributeIdentifierException)

"Normally" means that on the servers I tested with a JNDI testcase (OpenLDAP, Sun, Active Directory), the exceptions above are thrown. On Apache DS 0.9.2 they are not. I tried to find out whether it is mandatory to raise an error here (RFC 2251, chapter 4.10), but without a clear result.

Anyway, I will attach my testcase for your consideration on how to react on such operations ...


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Stefan Zoerner added a comment - 16/Aug/05 04:42 AM
Here is the test case. The tests are already included in my protocol suite and ran succesful against OpenLDAP, Sun and Active Directory. On Apache DS currently two of the three tests fail. To be more precise, the expected exceptions are not thrown.

Stefan Zoerner made changes - 16/Aug/05 04:42 AM
Field Original Value New Value
Attachment BasicCompareTests.java [ 12311758 ]
Alex Karasulu made changes - 16/Aug/05 06:24 AM
Status Open [ 1 ] In Progress [ 3 ]
Repository Revision Date User Message
ASF #239951 Wed Aug 24 22:12:20 UTC 2005 akarasulu added code to test on compare operations if the attribute being compared is not
defined within the schema or not present. In these cases the proper error codes
of undefinedAttributeType and noSuchAttribute respectively are returned. This
fix is for DIREVE-226 and the issue is here:

http://issues.apache.org/jira/browse/DIREVE-226
Files Changed
MODIFY /directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/CompareHandler.java

Alex Karasulu added a comment - 25/Aug/05 07:14 AM
Committed resolving fixes within revision 239951 here:

http://svn.apache.org/viewcvs.cgi?view=rev&rev=239951

Alex Karasulu made changes - 25/Aug/05 07:14 AM
Status In Progress [ 3 ] Resolved [ 5 ]
Fix Version/s 0.9.2 [ 12310192 ]
Resolution Fixed [ 1 ]
Stefan Zoerner added a comment - 25/Aug/05 05:36 PM
I rebuilded ApacheDS. The new Compare Handler provides the expected return codes in the situations described in this defect. Therefor I close the issue. Thanks for fixing it, Stefan

Stefan Zoerner made changes - 25/Aug/05 05:36 PM
Status Resolved [ 5 ] Closed [ 6 ]
Alex Karasulu made changes - 29/Aug/05 02:12 PM
Link This issue is related to DIREVE-233 [ DIREVE-233 ]
Alex Karasulu made changes - 10/Feb/06 12:34 PM
Project Directory Server [ 10516 ] Directory ApacheDS [ 12310260 ]
Fix Version/s 0.9.2 [ 12310192 ]
Affects Version/s 0.9.2 [ 12310192 ]
Key DIREVE-226 DIRSERVER-378