|
[
Permlink
| « Hide
]
Emmanuel Lecharny added a comment - 03/Feb/05 07:37 PM
Test case for DnParser
I noticed that the ANTLR code for DN is split into several files. Is this necessary?
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.
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. 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. Alan you still working on this one. FYI this also is responsible for DIREVE-179.
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.
It has been fixed a long time ago. Test cases has been added, too.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||