diff options
author | Kent Shikama <kent@kentshikama.com> | 2016-07-05 19:12:53 +0900 |
---|---|---|
committer | Kent Shikama <kent@kentshikama.com> | 2016-07-05 19:12:53 +0900 |
commit | 14362bf3590eb95a50201a84c8e16d5626b86249 (patch) | |
tree | 0199e01da5c5b9b48c5d9bb1bf35db2540b0dcde /synapse/handlers | |
parent | Fix pep8 (diff) | |
download | synapse-14362bf3590eb95a50201a84c8e16d5626b86249.tar.xz |
Fix password config
Diffstat (limited to 'synapse/handlers')
-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 be46681c64..e259213a36 100644 --- a/synapse/handlers/auth.py +++ b/synapse/handlers/auth.py @@ -750,7 +750,7 @@ class AuthHandler(BaseHandler): Returns: Hashed password (str). """ - return bcrypt.hashpw(password + self.hs.config.password_config.pepper, + return bcrypt.hashpw(password + self.hs.config.password_pepper, bcrypt.gensalt(self.bcrypt_rounds)) def validate_hash(self, password, stored_hash): @@ -764,7 +764,7 @@ class AuthHandler(BaseHandler): Whether self.hash(password) == stored_hash (bool). """ if stored_hash: - return bcrypt.hashpw(password + self.hs.config.password_config.pepper, + return bcrypt.hashpw(password + self.hs.config.password_pepper, stored_hash.encode('utf-8')) == stored_hash else: return False |