Hello,
I've inherited a little authentication module which uses
python-ldap (v1.92, 2005/11/03). For the most of it, it works
fine, but when a user has decided to use non-ascii characters
in their password, they will be blocked access and the
authentication log shows a message such as:
2010-08-27 11:02:50,398 DEBUG Exception: 'ascii' codec can't encode character
u'\xdf' in position 5: ordinal not in range(128)
As I'm not entirely comfortable yet working with Python, I'm
wondering if people here could advise on the best way to
resolve this issue.
Some questions and doubts are:
- is this a known problem that has been addressed in a later version? If so,
would any compatibility issues be expected between the two
versions?
- It should be possible to work around the issue by escaping the non-ascii
characters in the password, replacing them with a backslash followed by one or
more 2-digit hex codes representing the bytes that make up the character. Would
it be necessary to do this in the python-ldap module, or would it be safe to do
it before calling simple_bind?
Best regards,
Marc Brevoort
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev