[python-ldap] simple_bind_s, no exception on empty password

Michael Ströder michael at stroeder.com
Mon Dec 10 19:09:08 CET 2012


Chris Gray wrote:
> ldap_conn.whoami_s().decode('unicode_escape').encode('iso8859-1').decode('utf8')

This looks flawed.

LDAPv3 simply uses UTF-8.
So if you want to get the true Unicode string just do:

ldap_conn.whoami_s().decode('utf8')

Ciao, Michael.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3883 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20121210/39dd480d/attachment.bin>


More information about the python-ldap mailing list