Christoph Holtermann wrote:
> 
> Still working on commas in dn. When I now look
> at the functions supplied in python ldap there is
> for example :
> 
>>>> a='cn="lehmann, Andreas",dc=Adressbuch'
>>>> b=ldap.dn.str2dn(a)
>>>> b
> [[('cn', 'lehmann, Andreas', 1)], [('dc', 'Adressbuch', 1)]]
>>>> ldap.dn.dn2str(b)
> 'cn=lehmann\\, Andreas,dc=Adressbuch'
>>>> ldap.dn.explode_dn(a)
> ['cn=lehmann\\, Andreas', 'dc=Adressbuch']
> 
> So Python-LDAP itself goes this nonconform way of
> using escape sequences if I get it right.

Why do you think that this is wrong? I'd recommend to read RFC 4514 to
learn in detail instead of relying on false information given by others.

> I guess it's quite easy using dn2str and then converting it to a new
> string using "" instead of using str2dn or explode_dn that lead to
> ESC-Codes.

There's nothing wrong with correct escaping. Quoted RDN attribute values
should be avoided.

> But wouldn't it make sense to change the functions ?

No.

Ciao, Michael.

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev

Reply via email to