Unicode passwords containing special characters would break sha.new(). Now they're encoded as utf8 first.
This commit is contained in:
parent
c4a2cf6713
commit
e086114478
|
@ -73,7 +73,7 @@ class User( Persistent ):
|
|||
if password is None or len( password ) == 0:
|
||||
return None
|
||||
|
||||
return sha.new( salt + password ).hexdigest()
|
||||
return sha.new( ( salt + password ).encode( "utf8" ) ).hexdigest()
|
||||
|
||||
def check_password( self, password ):
|
||||
"""
|
||||
|
|
Reference in New Issue