Fix for LDAP-97: DistinguishedName now accepts '\r' as input, as specified in LDAP v3 RFC.
This commit is contained in:
@@ -46,8 +46,8 @@ PARSER_END(DnParserImpl)
|
||||
|
||||
TOKEN: { <#ALPHA: ["a"-"z", "A"-"Z"] > }
|
||||
TOKEN: { <#DIGIT: ["0"-"9"]> }
|
||||
TOKEN: { <#STRINGCHAR: ~[",","=","\r","+","<",">","#",";","\\","\""]> }
|
||||
TOKEN: { <#STRINGENDCHAR: ~[",","=","\r","+","<",">","#",";","\\","\""," "]> }
|
||||
TOKEN: { <#STRINGCHAR: ~[",","=","+","<",">","#",";","\\","\""]> }
|
||||
TOKEN: { <#STRINGENDCHAR: ~[",","=","+","<",">","#",";","\\","\""," "]> }
|
||||
TOKEN: { <#SPECIAL: [",","=","\r","+","<",">","#",";"]> }
|
||||
TOKEN: { <#HEXCHAR: ["0"-"9","a"-"f","A"-"F"]> }
|
||||
TOKEN: { <#HEXPAIR: <HEXCHAR> <HEXCHAR>> }
|
||||
|
||||
@@ -477,7 +477,7 @@ public class DistinguishedNameTest extends TestCase {
|
||||
DistinguishedName name = new DistinguishedName("cn=jo\"hn doe");
|
||||
assertNotNull(name);
|
||||
}
|
||||
|
||||
|
||||
public void testAppendChained() {
|
||||
DistinguishedName tested = new DistinguishedName("dc=mycompany,dc=com");
|
||||
tested.append("ou", "company1").append("cn", "john doe");
|
||||
@@ -498,4 +498,12 @@ public class DistinguishedNameTest extends TestCase {
|
||||
assertTrue(true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test for LDAP-97.
|
||||
*/
|
||||
public void testDistinguishedNameWithCRParsesProperly() {
|
||||
DistinguishedName name = new DistinguishedName("cn=foo \r bar");
|
||||
assertNotNull(name);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user