fixed problem CRYPT password comparsion, issue 1203, thanks Alan

This commit is contained in:
mdipierro
2012-12-06 23:04:29 -06:00
parent 8f7b82fdb3
commit 689dfcd83e
2 changed files with 8 additions and 1 deletions

View File

@@ -1 +1 @@
Version 2.3.0 (2012-12-06 23:01:24) rc1
Version 2.3.0 (2012-12-06 23:03:48) rc1

View File

@@ -2633,6 +2633,13 @@ class LazyCrypt(object):
"""
compares the current lazy crypted password with a stored password
"""
# LazyCrypt objects comparison
if isinstance(stored_password, self.__class__):
return ((self is stored_password) or
((self.crypt.key == stored_password.crypt.key) and
(self.password == stored_password.password)))
if self.crypt.key:
if ':' in self.crypt.key:
key = self.crypt.key.split(':')[1]