witten
/
luminotes
Archived
1
0
Fork 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
1 changed files with 1 additions and 1 deletions

View File

@ -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 ):
"""