diff --git a/userena/utils.py b/userena/utils.py index a9d8c745..30193bdb 100644 --- a/userena/utils.py +++ b/userena/utils.py @@ -112,7 +112,7 @@ def generate_sha1(string, salt=None): if not salt: salt = sha_constructor(str(random.random()).encode('utf-8')).hexdigest()[:5] - salted_bytes = (salt.encode('utf-8') + string.encode('utf-8')) + salted_bytes = (salt.encode('utf-8') + unicode(string,'utf-8').encode('utf-8')) hash_ = sha_constructor(salted_bytes).hexdigest() return salt, hash_