directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <elecha...@gmail.com>
Subject Re: Utility for DN character escaping?
Date Wed, 12 Jun 2013 07:19:04 GMT
Le 6/11/13 11:51 PM, ernie kovak a écrit :
> Is there a class that will handle character escaping for DNs? Something like what the
FilterEncoder class does for search filters?

No. The pb is that it does not make a lot of sense to escape anything in
a DN : how does such a method knows what to escape ? For instance, the
',', '=', ';'... chars are likely to be used as perfectly valid chars in
a DN, so how do we decide that they should be eascaped ?

Let me give you an example : we have a cn which value is
'acme;ou=paris'. In a DN, that would be "cn=acme;ou=paris, dc=acme,
dc=com". This is a valid Dn, which will be parsed as the list of 4 RDN :
cn=acme
ou=paris
dc=acme
dc=com

which is really different from the real (or expected) list of RDNs :
cn=acme;ou=paris
dc=acme
dc=com


So magically, a method would *know* that it should escape the ';' and
the '=' in "acme;ou=paris" ?

It's really doubtful.

Thoughts ?


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 


Mime
View raw message