mirror of
https://github.com/element-hq/synapse.git
synced 2026-10-23 13:03:28 +00:00
fix ability to change password to a non-ascii one
https://github.com/vector-im/riot-web/issues/2658
This commit is contained in:
1 parent
b2f8642d3d
commit
f2a5aebf98
1 file changed
+2
-2
@@ -656,8 +656,8 @@ class AuthHandler(BaseHandler):
|
||||
Whether self.hash(password) == stored_hash (bool).
|
||||
"""
|
||||
if stored_hash:
|
||||
return bcrypt.hashpw(password + self.hs.config.password_pepper,
|
||||
stored_hash.encode('utf-8')) == stored_hash
|
||||
return bcrypt.hashpw(password.encode('utf8') + self.hs.config.password_pepper,
|
||||
stored_hash.encode('utf8')) == stored_hash
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
Reference in new issue
Block a user