diff options
author | Erik Johnston <erik@matrix.org> | 2019-09-10 18:15:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-10 18:15:07 +0100 |
commit | 5e9b05d7da5784ea0af5e75e6ced77c8e22c78c0 (patch) | |
tree | 582b760730678a74ca3d99f67622cc7d5e375b5e /synapse/handlers/auth.py | |
parent | Merge pull request #6004 from matrix-org/jaywink/autojoin-create-real-users (diff) | |
parent | Add changelog (diff) | |
download | synapse-5e9b05d7da5784ea0af5e75e6ced77c8e22c78c0.tar.xz |
Merge pull request #6011 from matrix-org/anoa/fix_3pid_validation
Use account_threepid_delegate for 3pid validation
Diffstat (limited to 'synapse/handlers/auth.py')
-rw-r--r-- | synapse/handlers/auth.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py index d0c0142740..374372b69e 100644 --- a/synapse/handlers/auth.py +++ b/synapse/handlers/auth.py @@ -444,7 +444,16 @@ class AuthHandler(BaseHandler): logger.info("Getting validated threepid. threepidcreds: %r", (threepid_creds,)) if self.hs.config.threepid_behaviour_email == ThreepidBehaviour.REMOTE: - threepid = yield identity_handler.threepid_from_creds(threepid_creds) + if medium == "email": + threepid = yield identity_handler.threepid_from_creds( + self.hs.config.account_threepid_delegate_email, threepid_creds + ) + elif medium == "msisdn": + threepid = yield identity_handler.threepid_from_creds( + self.hs.config.account_threepid_delegate_msisdn, threepid_creds + ) + else: + raise SynapseError(400, "Unrecognized threepid medium: %s" % (medium,)) elif self.hs.config.threepid_behaviour_email == ThreepidBehaviour.LOCAL: row = yield self.store.get_threepid_validation_session( medium, |