Problem with names that include ","
Yves Dorfsman
yves at zioup.com
Tue Jun 2 15:26:43 CEST 2009
Michael Ströder wrote:
>>
>>> I am working on a filter that makes Thunderbirds LDIF-Output
>>> importable to OpenLDAP. It works quite fine except for names
>>> that include ",". OpenLDAP dislikes the output that is produced
>>> like :
>>>
>>> dn: cn=Lehmann\, Veronika,dc=Adressbuch,dc=christoph
>> Escaping characters is used by some LDAP servers, not all of them, but is
>> not conform to LDIF.
>
> Yves, that sounds wrong to me.
>
> According to RFC 4514 a comma within a RDN value has to either be
> escaped with \ or converted to hex-escaped value. That's what function
> ldap.dn.escape_dn_chars() is for. And you can directly use the result in
> LDIF.
Michael is right here, even though there is no escaping in LDIF itself, you
can use a backslash in an LDIF file, and RFC 4514 defines the backslash
syntax to escape some characters.
Sorry to mislead you Christoph.
--
Yves.
http://www.sollers.ca/
More information about the python-ldap
mailing list