mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-25 01:30:27 -04:00
Hash passwords earlier in the password reset process (#7538)
This now matches the logic of the registration process as modified in
56db0b1365
/ #7523.
This commit is contained in:
parent
4fa74c7606
commit
9dc6f3075a
5 changed files with 33 additions and 11 deletions
|
@ -431,8 +431,8 @@ class RegisterRestServlet(RestServlet):
|
|||
raise SynapseError(400, "Invalid password")
|
||||
self.password_policy_handler.validate_password(password)
|
||||
|
||||
# If the password is valid, hash it and store it back on the request.
|
||||
# This ensures the hashed password is handled everywhere.
|
||||
# If the password is valid, hash it and store it back on the body.
|
||||
# This ensures that only the hashed password is handled everywhere.
|
||||
if "password_hash" in body:
|
||||
raise SynapseError(400, "Unexpected property: password_hash")
|
||||
body["password_hash"] = await self.auth_handler.hash(password)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue