Skip to content

Commit

Permalink
Fix UTF-8 usernames when creating user. Fixes #312.
Browse files Browse the repository at this point in the history
  • Loading branch information
wunki committed Oct 14, 2013
1 parent 0bf072a commit 0076ab8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion userena/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def generate_sha1(string, salt=None):
"""
if not salt:
salt = sha_constructor(str(random.random())).hexdigest()[:5]
hash = sha_constructor(salt+str(string)).hexdigest()
hash = sha_constructor(salt+str(string.encode('utf-8'))).hexdigest()

return (salt, hash)

Expand Down

0 comments on commit 0076ab8

Please sign in to comment.