unicode support for CryptContext schemes

15 views
Skip to first unread message

Roland van Laar

unread,
Jul 10, 2014, 10:01:14 AM7/10/14
to passli...@googlegroups.com
Hi,

CryptContext Schemes doesn't work with unicode scheme.
I'm using passlib 1.6.2 with python 2.7.6

I included a code example:
<code>
from passlib.context import CryptContext
# with string
CryptContext(schemes=['pbkdf2_sha256'])
# with unicode
CryptContext(schemes=[u'pbkdf2_sha256']) # Raises TypeError
</code>

A fix (that works for me), with linenumbers from hg.

passlib/context.py
1028: elif isinstance(elem, basestring)

passlib/registry.py
313: assert isinstance(name, basestring)

Regards,

Roland van Laar

Eli Collins

unread,
Jan 25, 2015, 2:29:25 PM1/25/15
to passli...@googlegroups.com
Thanks for the bug report, and for tracking it down!

To keep track of this, I filed an issue for it (https://code.google.com/p/passlib/issues/detail?id=54).

Your fix takes care of that issue, but I plan to audit the unittests & code before the next release to see if anything else like that case has gone unnoticed.

I'm trying to push for the 1.7 release by the end of 2015 Q1, but if that slips, this fix will definitely be in the 1.6.3 point release that'll come out instead.

Roland van Laar

unread,
Jan 26, 2015, 5:10:27 AM1/26/15
to passli...@googlegroups.com
Cool, Cool,

Roland
--
You received this message because you are subscribed to the Google Groups "passlib-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to passlib-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages