diff options
author | Richard van der Hoff <richard@matrix.org> | 2019-07-01 14:21:03 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2019-07-01 14:21:03 +0100 |
commit | b4fd86a9b406dca213d5ae94df698533491936e3 (patch) | |
tree | 6c466f5921e990a2a582efd926b1eef8204e24db /synapse/handlers/set_password.py | |
parent | Address review comments (diff) | |
parent | Make the http server handle coroutine-making REST servlets (#5475) (diff) | |
download | synapse-b4fd86a9b406dca213d5ae94df698533491936e3.tar.xz |
Merge branch 'develop' into rav/saml2_client
Diffstat (limited to 'synapse/handlers/set_password.py')
-rw-r--r-- | synapse/handlers/set_password.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/handlers/set_password.py b/synapse/handlers/set_password.py index 5a0995d4fe..d90c9e0108 100644 --- a/synapse/handlers/set_password.py +++ b/synapse/handlers/set_password.py @@ -33,6 +33,9 @@ class SetPasswordHandler(BaseHandler): @defer.inlineCallbacks def set_password(self, user_id, newpassword, requester=None): + if not self.hs.config.password_localdb_enabled: + raise SynapseError(403, "Password change disabled", errcode=Codes.FORBIDDEN) + password_hash = yield self._auth_handler.hash(newpassword) except_device_id = requester.device_id if requester else None |