Issue Details (XML | Word | Printable)

Key: DIRSERVER-326
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Alex Karasulu
Reporter: Jacob S. Barrett
Votes: 0
Watchers: 1
Operations

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

ServerDirContext.search() with filter arguments always gets index out of bounds (in two places).

Created: 21/Sep/05 05:00 AM   Updated: 21/Apr/07 11:18 AM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works search-filterargs.patch 2005-09-21 05:01 AM Jacob S. Barrett 4 kB

Resolution Date: 22/Sep/05 11:56 AM


 Description  « Hide
When searching the ServerDirContext with filter arguments it throws index out of bounds exceptions in two places.

The first place is where it attempts to substitute the value into the buffer it uses the index of the } char as the index into the arguments.

The second one, after you fix the first, is when the search for { reaches the end of the string.

The attached patch fixes both and includes a JUnit test.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Trustin Lee added a comment - 22/Sep/05 11:56 AM
The patch looks good. I applied it. But wouldn't there be any nested {} blocks? Just a question by my curiousity.

Jacob S. Barrett added a comment - 22/Sep/05 11:54 PM
I don't think nested {} are supported. The don't appear to be in MessageFormat, which is similar. There is one thing this is missing though. Might the values need to be encoded? Maybe not since this is really for inproc access to the directory. What are your thoughts?

Emmanuel Lecharny added a comment - 21/Apr/07 11:18 AM
Closing all issues created in 2005 and before which are marked resolved