Closed rwinch closed 8 years ago
rwinch said: {quote} The effect is the quotes have been converted from delimiters to part of the value. {quote}
I don't understand why you feel like this is a bug. If you do not want the quotes as part of the value, do not include the quotes.
If we change this behavior, how would someone express that they wanted quotes in the value?
rwinch said: Resolving as invalid. If you disagree and can provide explanation for my questions in the previous comment, please open a new ticket. Otherwise the solution is to not include the " in the first place.
Original Reporter: tailwaggers Environment: Not Specified Version: 1.3.1 Migrated From: https://jira.spring.io//browse/LDAP-296 The DistinguishedName class incorrectly parses DNs that use the quotes around a value to handle special characters. According to the last paragraph in section 4 of RFC 2253: {quote} Implementations MUST allow a value to be surrounded by quote ('"' ASCII 34) characters, which are not part of the value. Inside the quoted value, the following characters can occur without any escaping:
{quote}
The following code: {code:java} String stringDn = "ou=\"Foo + Bar\",cn=some,cn=org"; DistinguishedName dn = new DistinguishedName(stringDn); System.out.println(stringDn); System.out.println(dn); {code} Prints out: {noformat} ou="Foo + Bar",cn=some,cn=org ou=\"Foo + Bar\",cn=some,cn=org {noformat} The effect is the quotes have been converted from delimiters to part of the value.
I think it would be fine if it normalized the DN to the preferred method of handling special characters -- escaping them. {noformat} ou=Foo + Bar,cn=some,cn=org {noformat}