Issue Details (XML | Word | Printable)

Key: DIRSERVER-196
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Alan Cabrera
Reporter: Emmanuel Lecharny
Votes: 0
Watchers: 0
Operations

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

DnParser does not respect RFC2253

Created: 03/Feb/05 07:36 PM   Updated: 24/Jun/06 09:01 PM
Return to search
Component/s: ldap
Affects Version/s: pre-1.0
Fix Version/s: pre-1.0

Time Tracking:
Not Specified

File Attachments:
  Size
Java Source File Licensed for inclusion in ASF works DnParserTest.java 2005-02-03 07:37 PM Emmanuel Lecharny 17 kB
Environment: NR

Resolution Date: 12/Aug/05 06:52 AM


 Description  « Hide
The DnParser does not conform to RFC 2253 and RFC 1779 :

parsed : "CN=L. Eagle,O=Sue\, Grabbit and Runn,C=GB"
expected : "CN=L. Eagle,O=Sue\,Grabbit and Runn,C=GB"

Parsing "CN=Before\0DAfter,O=Test,C=GB" leads to an infinite loop

Other tests are to be done ...


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Emmanuel Lecharny added a comment - 03/Feb/05 07:37 PM
Test case for DnParser

Emmanuel Lecharny made changes - 03/Feb/05 07:37 PM
Field Original Value New Value
Attachment DnParserTest.java [ 18834 ]
Alan Cabrera added a comment - 03/Feb/05 10:48 PM
I noticed that the ANTLR code for DN is split into several files. Is this necessary?

Alex Karasulu added a comment - 04/Feb/05 02:09 AM
Perhaps not - I don't know. I tried to get grammar into one lexer but Antlr would not have it. It's due I think to oddities in the EBNF with values conflicting with identifiers. I needed to switch lexical state. Allan could u take the time to look at the RFC and the grammar to figure this out for me. I'd like a second oppinion on this.

Alan Cabrera made changes - 04/Feb/05 04:54 AM
Assignee Alex Karasulu [ akarasulu ] Alan Cabrera [ maguro ]
Alan Cabrera added a comment - 05/Feb/05 12:16 AM
Fixed the infinite loop. The string "CN=Before\0DAfter,O=Test,C=GB" should be "CN=Before\\0DAfter,O=Test,C=GB".

We should be immune to bad strings like this. We should add a check before we parse.

Alan Cabrera added a comment - 05/Feb/05 12:37 AM
The value parser does something odd. It parses the values in bits. I suspect that it does this because it wants the possibility to normalize the bits; which is something that it doesn't seem to do very well atm but, I could be wrong.

The problem w/ parsing in pieces is that the parser thinks that this is a valid value

CN= FOO "BAR" CAR ,

I believe that the value parser should grab the whole value in one valid piece. If normalization needs to take place, then break the valid value into tiny normalizable pieces.

Alex Karasulu added a comment - 12/Aug/05 04:34 AM
Alan you still working on this one. FYI this also is responsible for DIREVE-179.

Alex Karasulu made changes - 12/Aug/05 06:44 AM
Description The DnParser does not conform to RFC 2253 and RFC 1779 :

parsed : "CN=L. Eagle,O=Sue\, Grabbit and Runn,C=GB"
expected : "CN=L. Eagle,O=Sue\,Grabbit and Runn,C=GB"

Parsing "CN=Before\0DAfter,O=Test,C=GB" leads to an infinite loop

Other tests are to be done ...
The DnParser does not conform to RFC 2253 and RFC 1779 :

parsed : "CN=L. Eagle,O=Sue\, Grabbit and Runn,C=GB"
expected : "CN=L. Eagle,O=Sue\,Grabbit and Runn,C=GB"

Parsing "CN=Before\0DAfter,O=Test,C=GB" leads to an infinite loop

Other tests are to be done ...
Fix Version/s 0.9.2 [ 12310220 ]
Alex Karasulu added a comment - 12/Aug/05 06:52 AM
Looking now at the test cases it appears as though the problems discussed are passing in the parser. The scenarios causing trouble where in LdapNameTest.

Alex Karasulu made changes - 12/Aug/05 06:52 AM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Alex Karasulu made changes - 07/Feb/06 02:41 PM
Fix Version/s 0.9.2 [ 12310220 ]
Affects Version/s 0.8.0 [ 11000 ]
Fix Version/s pre-1.0 [ 12310782 ]
Key DIRLDAP-34 DIRSERVER-196
Component/s ldap [ 12310715 ]
Affects Version/s pre-1.0 [ 12310782 ]
Component/s Common [ 11085 ]
Project Directory LDAP [ 10514 ] ApacheDS [ 12310260 ]
Emmanuel Lecharny added a comment - 24/Jun/06 09:01 PM
It has been fixed a long time ago. Test cases has been added, too.

Emmanuel Lecharny made changes - 24/Jun/06 09:01 PM
Status Resolved [ 5 ] Closed [ 6 ]