[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Uid with '+' sign ?



Christiaan den Besten writes:
> I have a small problem with inserting a uid "uid=bob+alice,ou=xxx.."
> into by ldap.  (...) I still don't see how to prepare my add
> DN to insert this value.

You must escape certain characters from attribute values which you use
to build a DN or RDN:
  NUL <space at beginning/end> " <# at beginning> + , ; < > \
Either prefix the character (except for NUL) with \ or use \<hex of
ascii value>:
  "uid=bob\2Balice,ou=xxx.."
(You may escape other characters too, usually only with the \<hex> form.
And sometimes yet another form is used, in particular for attribute
values whose LDAP encoding allows non-UTF-8 strings.)

RFC 2253 (LDAP: UTF-8 String Representation of Distinguished Names)
describes this, but it has some inconsistencies.  These have been
corrected in the draft for the upcoming LDAPv3 standard, see
http://www.ietf.org/internet-drafts/draft-ietf-ldapbis-dn-16.txt
(the version number may increase until it becomes an RFC).

-- 
Hallvard