We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b84156 commit af9b558Copy full SHA for af9b558
userena/utils.py
@@ -112,7 +112,7 @@ def generate_sha1(string, salt=None):
112
if not salt:
113
salt = sha_constructor(str(random.random()).encode('utf-8')).hexdigest()[:5]
114
115
- salted_bytes = (salt.encode('utf-8') + string.encode('utf-8'))
+ salted_bytes = (salt.encode('utf-8') + unicode(string,'utf-8').encode('utf-8'))
116
hash_ = sha_constructor(salted_bytes).hexdigest()
117
118
return salt, hash_
0 commit comments