Message2054
Many crypt implementations today allow md5 passwords.
These have -- instead of a two character salt like the
old DES-based crypt -- a longer string:
'$1$' + 8-character-length-hash + optional '$'
The current crypt implementation in roundup/password.py
explicitly truncates the salt to two characters. The
old DES-base crypt routine can deal very well with
longer strings (in fact for password checking it is
passed the whole encrypted password instead of only the
first two characters that constitute the salt and this
use is documented in the python manual page for crypt),
so I propose to remove that truncation (patch is also
attached as a file):
@@ -43,7 +43,7 @@
s = md5.md5(plaintext).hexdigest()
elif scheme == 'crypt' and crypt is not None:
if other is not None:
- salt = other[:2]
+ salt = other
else:
saltchars = './0123456789'+string.letters
salt = random.choice(saltchars) +
random.choice(saltchars)
|
|
Date |
User |
Action |
Args |
2009-02-03 14:21:30 | admin | link | issue1372253 messages |
2009-02-03 14:21:30 | admin | create | |
|