[python-ldap] Problems with using SASL and unicode

Luminita Moruz lumi.moruz at gmail.com
Thu May 8 07:59:58 CEST 2014


Hi Michael,

Thanks for the fast reply, it worked like a charm.

Luminita



On Wed, May 7, 2014 at 6:32 PM, Michael Ströder <michael at stroeder.com>wrote:

> Luminita Moruz wrote:
> > I am trying to use python-ldap with SASL. but I am not able to get SASL
> > working when the username or password contain special characters.
> > def main():
> > [..]
> >     u = u"user"
> >     p = u"pass"
> >     my_function(u.encode("utf-8"), p.encode("utf-8"))
> > [..]
> > {'info': '8009030C: LdapErr: DSID-0C0904F8, comment:
> AcceptSecurityContext
> > error, data 52e, v23f0', 'desc': 'Invalid credentials'} otherwise.
>
> This is buggy MS AD. Use .encode('iso-8859-1') with this crap
> (although the SASL handshake observed with Wireshark also mentions UTF-8).
>
> Ciao, Michael.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20140508/c8860183/attachment.html>


More information about the python-ldap mailing list