summary refs log tree commit diff
path: root/synapse/handlers/set_password.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-06-28 10:04:54 +0100
committerErik Johnston <erik@matrix.org>2019-06-28 10:04:54 +0100
commit576b62a6a314ea3928f8717704bbd3aedbdd1f25 (patch)
treea9252a394dae4fc3839585a2abfeeee65593560a /synapse/handlers/set_password.py
parentMerge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes (diff)
parentUpdate the TLS cipher string and provide configurability for TLS on outgoing ... (diff)
downloadsynapse-576b62a6a314ea3928f8717704bbd3aedbdd1f25.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
Diffstat (limited to 'synapse/handlers/set_password.py')
-rw-r--r--synapse/handlers/set_password.py3
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