[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>:
(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
(the version number may increase until it becomes an RFC).