mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-15 08:53:51 +01:00
Don't error on non-ascii passwords
This commit is contained in:
parent
80d5d3baa1
commit
9084720993
1 changed files with 1 additions and 1 deletions
|
@ -653,7 +653,7 @@ class AuthHandler(BaseHandler):
|
||||||
Returns:
|
Returns:
|
||||||
Hashed password (str).
|
Hashed password (str).
|
||||||
"""
|
"""
|
||||||
return bcrypt.hashpw(password + self.hs.config.password_pepper,
|
return bcrypt.hashpw(password.encode('utf8') + self.hs.config.password_pepper,
|
||||||
bcrypt.gensalt(self.bcrypt_rounds))
|
bcrypt.gensalt(self.bcrypt_rounds))
|
||||||
|
|
||||||
def validate_hash(self, password, stored_hash):
|
def validate_hash(self, password, stored_hash):
|
||||||
|
|
Loading…
Reference in a new issue