Roundup Tracker - Issues

Message2054

Author schlatterbeck
Recipients
Date 2005-12-03.10:11:43
Message-id
In-reply-to
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)
History
Date User Action Args
2009-02-03 14:21:30adminlinkissue1372253 messages
2009-02-03 14:21:30admincreate