diff options
author | Erik Johnston <erik@matrix.org> | 2015-10-20 16:57:51 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-10-20 16:57:51 +0100 |
commit | 44e2933bf87d278ef0d860ee04e61ecac9744480 (patch) | |
tree | c6a15fc8843f99a9f9ce0e47ab2b4254f5d285e4 /synapse/handlers/auth.py | |
parent | Explicitly check for Sqlite3Engine (diff) | |
parent | Docstring (diff) | |
download | synapse-44e2933bf87d278ef0d860ee04e61ecac9744480.tar.xz |
Merge branch 'erikj/filter_refactor' into erikj/search
Diffstat (limited to 'synapse/handlers/auth.py')
-rw-r--r-- | synapse/handlers/auth.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py index 484f719253..055d395b20 100644 --- a/synapse/handlers/auth.py +++ b/synapse/handlers/auth.py @@ -44,6 +44,7 @@ class AuthHandler(BaseHandler): LoginType.EMAIL_IDENTITY: self._check_email_identity, LoginType.DUMMY: self._check_dummy_auth, } + self.bcrypt_rounds = hs.config.bcrypt_rounds self.sessions = {} @defer.inlineCallbacks @@ -432,7 +433,7 @@ class AuthHandler(BaseHandler): Returns: Hashed password (str). """ - return bcrypt.hashpw(password, bcrypt.gensalt()) + return bcrypt.hashpw(password, bcrypt.gensalt(self.bcrypt_rounds)) def validate_hash(self, password, stored_hash): """Validates that self.hash(password) == stored_hash. |