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