Feature #121
[sync] function to escape special characters in RDN
| Status: | New | Start: | 07/10/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | Core | |||
| Target version: | - |
Description
RFC say:
8<--------
If the UTF-8 string does not have any of the following characters
which need escaping, then that string can be used as the string
representation of the value.
o a space or "#" character occurring at the beginning of the
string
o a space character occurring at the end of the string
o one of the characters ",", "+", """, "\", "<", ">" or ";"
Implementations MAY escape other characters.
If a character to be escaped is one of the list shown above, then it
is prefixed by a backslash ('\' ASCII 92).
Otherwise the character to be escaped is replaced by a backslash and
two hex digits, which form a single byte in the code of the
character.
8<--------
It could be useful, when we build our one DN, to have a function that verify and escape special characters in the RDN value, as mentioned above.
History
Updated by Jonathan Clarke 10 months ago
Hi,
Which RFC says this? Could you point to the number?
Are these rules the same as for LDIF representation or not? We implemented that (see feature #46) in the logger to output base64 strings... it sounds like this is different, though. However, I'm sure similar logic applies.
Jonathan
Updated by Thomas Chemineau 10 months ago
I pasted an extract from the RFC 2253 (http://www.ietf.org/rfc/rfc2253.txt) which is obsolete in fact.
I seems that the RFC 4514 is the latest: http://tools.ietf.org/html/rfc4514.
It is almost the same, apparently.