[Zope-dev] zope.password

Wichert Akkerman wichert at wiggy.net
Wed Sep 23 07:43:41 EDT 2009


On 2009-9-23 13:29, Daniel Holth wrote:
> sqlite for example will always return strings as unicode strings, or
> it will always return strings as byte strings. It doesn't know how to
> return the username colum as one kind of string and the hash column as
> another kind of string.

SQLite is an extremely minimal database. This is just one of the 
situations where you need to massage its output. If you use SQLAlchemy 
on top of SQLite this will work properly.

> I think this is really a bug in the urlsafe base64 module. This works:
> unicode(u"foobar".encode('base64')).decode('base64')

That generates something entirely differently than standard SSHA1 
implementations, which will break interop.

Wichert.

-- 
Wichert Akkerman <wichert at wiggy.net>   It is simple to make things.
http://www.wiggy.net/                  It is hard to make things simple.


More information about the Zope-Dev mailing list