fixed exception on missin stored_password

This commit is contained in:
mdipierro
2012-09-17 07:10:51 -05:00
parent 06e5c6869d
commit 372d639601
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.0.9 (2012-09-16 15:55:07) stable
Version 2.0.9 (2012-09-17 07:10:46) stable
+3 -1
View File
@@ -2593,7 +2593,9 @@ class LazyCrypt(object):
key = self.crypt.key
else:
key = ''
if stored_password.count('$')==2:
if stored_password is None:
return False
elif stored_password.count('$')==2:
(digest_alg, salt, hash) = stored_password.split('$')
h = simple_hash(self.password, key, salt, digest_alg)
temp_pass = '%s$%s$%s' % (digest_alg, salt, h)