Archived
1
0

Unicode passwords containing special characters would break sha.new(). Now they're encoded as utf8 first.

This commit is contained in:
Dan Helfman 2008-01-03 22:04:34 +00:00
parent c4a2cf6713
commit e086114478

View File

@ -73,7 +73,7 @@ class User( Persistent ):
if password is None or len( password ) == 0: if password is None or len( password ) == 0:
return None return None
return sha.new( salt + password ).hexdigest() return sha.new( ( salt + password ).encode( "utf8" ) ).hexdigest()
def check_password( self, password ): def check_password( self, password ):
""" """