diff options
| author | Noriko Hosoi <nhosoi@redhat.com> | 2009-01-06 22:50:30 +0000 |
|---|---|---|
| committer | Noriko Hosoi <nhosoi@redhat.com> | 2009-01-06 22:50:30 +0000 |
| commit | 3d9bdf5a15fcb3df6822aa9054e70d80ced07087 (patch) | |
| tree | dd47111eca4e992f8722493adea232f6d1635722 /ldap/admin | |
| parent | b549731422b37541cfd007d7ec09e9b1482413cf (diff) | |
Resolves: #438139
Summary: DN with antislash('\') rename (modrdn) problem
Problem description:
Unescape codes in the DS (strcpy_special_undo in ava.c and
strcpy_unescape_dnvalue in dn.c) were "unescaping" more than the escape code
(e.g., escape_dn_value in NET LDAP) does escaping. The test string
'BeforeSlash\AfterSlash' fortunately/unfortunately contains '\Af', which is
considered '\##' (where # is hex number) by the DS unescape functions even
though it was not meant to be escaped. As long as using UTF-8, there is no
chance for the server to receive "\af".
Change description:
1) There were identical static functions: strcpy_special_undo (ava.c) and
strcpy_special_undo (dn.c). Merged them to strcpy_unescape_value and put it in
util.c.
2) In the unescape/normalize functions for dn (strcpy_unescape_value in util.c
and substr_dn_normalize in dn.c), added a check for the first hex number in
'\##'. If the 8th bit is on, we don't do unescaping but store it as is since
the unescaped character is not UTF-8.
3) If 2 consecutive '\'s are passed to the unescape/normalize functions, keep
one of them.
Diffstat (limited to 'ldap/admin')
0 files changed, 0 insertions, 0 deletions
