identity.saprovider.encryption_algorithm

1 view
Skip to first unread message

Jose Soares

unread,
Dec 4, 2006, 11:33:24 AM12/4/06
to turbo...@googlegroups.com
Hi all,

I'm trying md5 encryption on identity.

I inserted the passwords in my table using Zope-ExtendibleUserFolder
Now I have my password like this:

'5fMbBqEU9vZB+EtWkloEqQ=='

tg doesn't recognize my password, I looked at saprovider.py lines:

129 if "md5"==algorithm:
130 self.encrypt_password = lambda pw: md5.new(pw).hexdigest()

and I see it generate my password as:

'662eaa47199461d01a623884080934ab'

I tried changing it as:

129 if "md5"==algorithm:
130 self.encrypt_password = lambda pw: md5.new(pw).digest()

and then the password became"

'\xe5\xf3\x1b\x06\xa1\x14\xf6\xf6A\xf8KV\x92Z\x04\xa9'


in my config/app.cfg there's the line:

identity.saprovider.encryption_algorithm="md5"

nut it doesn't work.
any ideas?

jo

Jose Soares

unread,
Dec 4, 2006, 11:45:03 AM12/4/06
to turbo...@googlegroups.com
Jose Soares ha scritto:

Now it works by changing saprovider.py as:

import base64
self.encrypt_password = lambda pw:
base64.encodestring(md5.new(pw).digest()).strip('\n')

jo
------
PS: I have to remember this customization every time I update tg. :-(

Reply all
Reply to author
Forward
0 new messages