Actually it is not that clear from the RFC=2E It seems that future versi=
ons of OpenLdap will accept such a DN like that but will return then (in=
searches) with the EQUALs escaped=2E
Thank you for the replies=2E
----- Original Message -----
From=3A Michael Str=F6der =3Cmichael=40stroeder=2Ecom=3E
Date=3A Friday=2C July 16=2C 2004 10=3A49 am
Subject=3A Re=3A ldap=5Fexplode=5Fdn is broken
=3E yoel=40emet=2Eco=2Eil wrote=3A
=3E =3E =
=3E =3E Please note that ldap=5Fexplode=5Fdn is broken in recent minor =
=3E versions of
=3E =3E OpenLdap (it worked properly with 2=2E2=2E6 bot not with 2=2E2=2E=
13/14)=2E =
=3E For DN
=3E =3E parts with multipe EQUALS (=27=3D=27) the C library returns NULL=
=
=3E regardless of
=3E =3E the content of the DN=2E Python-ldap raises an exception=2E
=3E =
=3E Testing=2E=2E=2E
=3E =
=3E =3E=3E=3E from ldap import explode=5Fdn
=3E =3E=3E=3E explode=5Fdn(=27cn=3DMichael Stroeder=2Cdc=3Dstroeder=2Cdc=
=3Dde=27)
=3E =5B=27cn=3DMichael Stroeder=27=2C =27dc=3Dstroeder=27=2C =27dc=3Dde=27=
=5D
=3E =3E=3E=3E explode=5Fdn(=27cn=3DMichael =3D Stroeder=27)
=3E Traceback (most recent call last)=3A
=3E File =22=3Cstdin=3E=22=2C line 1=2C in =3F
=3E File =22/usr/lib/python2=2E3/site-packages/ldap/functions=2Epy=22=2C=
line =
=3E 117=2C in =
=3E explode=5Fdn
=3E return =5Fldap=5Ffunction=5Fcall(=5Fldap=2Eexplode=5Fdn=2Cdn=2Cn=
otypes)
=3E File =22/usr/lib/python2=2E3/site-packages/ldap/functions=2Epy=22=2C=
line =
=3E 57=2C in =
=3E =5Fldap=5Ffunction=5Fcall
=3E result =3D func(*args=2C**kwargs)
=3E ldap=2ELDAPError=3A (11=2C =27Resource temporarily unavailable=27)
=3E =3E=3E=3E explode=5Fdn(=27cn=3DMichael =5C=3D Stroeder=27)
=3E =5B=27cn=3DMichael =5C=5C3D Stroeder=27=5D
=3E =3E=3E=3E
=3E =
=3E All cases look good to me=2E=2E=2E
=3E =
=3E =3E Exaples of such DNs=3A cn=3Duid=3Dyoel=5Fo=3Dorg=2Co=3Dorg
=3E =
=3E This is not a valid DN anyway=2E It looks like produced by an =
=3E erronous =
=3E application=2E
=3E =
=3E =3E=3E=3E explode=5Fdn(=27cn=3Duid=3Dyoel=5Fo=3Dorg=2Co=3Dorg=27)
=3E Traceback (most recent call last)=3A
=3E File =22=3Cstdin=3E=22=2C line 1=2C in =3F
=3E File =22/usr/lib/python2=2E3/site-packages/ldap/functions=2Epy=22=2C=
line =
=3E 117=2C in =
=3E explode=5Fdn
=3E return =5Fldap=5Ffunction=5Fcall(=5Fldap=2Eexplode=5Fdn=2Cdn=2Cn=
otypes)
=3E File =22/usr/lib/python2=2E3/site-packages/ldap/functions=2Epy=22=2C=
line =
=3E 57=2C in =
=3E =5Fldap=5Ffunction=5Fcall
=3E result =3D func(*args=2C**kwargs)
=3E ldap=2ELDAPError=3A (2=2C =27No such file or directory=27)
=3E =
=3E Well=2C the error message is misleading I have to admit=2E But that =
=3E ldap=2Eexplode=5Fdn() fails here is correct=2E
=3E =
=3E The equal sign =27=3D=27 has to be escaped with a back-slash =27=5C=27=
=2E See =
=3E RFC2253 or =
=3E draft-ietf-ldapbis-dn=2E
=3E =
=3E =3E=3E=3E explode=5Fdn(=27cn=3Duid=5C=3Dyoel=5Fo=5C=3Dorg=2Co=3Dorg=27=
)
=3E =5B=27cn=3Duid=5C=5C3Dyoel=5Fo=5C=5C3Dorg=27=2C =27o=3Dorg=27=5D
=3E =3E=3E=3E
=3E =
=3E Ciao=2C Michael=2E
=3E =
=3E
|