diff options
author | Matthew Hodgson <matthew@arasphere.net> | 2016-12-20 00:02:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-20 00:02:13 +0000 |
commit | 09f15918be80236301b70996006f8914773d6328 (patch) | |
tree | f2b50e1d988f7190eaef25540687e2111d30628e | |
parent | Merge pull request #1709 from kyrias/bind_addresses (diff) | |
parent | fix ability to change password to a non-ascii one (diff) | |
download | synapse-09f15918be80236301b70996006f8914773d6328.tar.xz |
Merge pull request #1711 from matrix-org/matthew/utf8-password-change
fix ability to change password to a non-ascii one
-rw-r--r-- | synapse/handlers/auth.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py index 3b146f09d6..652efba455 100644 --- a/synapse/handlers/auth.py +++ b/synapse/handlers/auth.py @@ -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 |