diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2019-06-06 16:12:57 +0100 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2019-06-06 16:12:57 +0100 |
commit | 96f43fe81da42c46fac75b6f5fd631dbdd5b1eae (patch) | |
tree | 563d6c1424ff4fe46792942d3d370af32937c9a0 | |
parent | We don't support msisdn, geddit? (diff) | |
download | synapse-96f43fe81da42c46fac75b6f5fd631dbdd5b1eae.tar.xz |
Fix typo and logic issue
-rw-r--r-- | synapse/handlers/auth.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py index dd7c667e47..69f924b3eb 100644 --- a/synapse/handlers/auth.py +++ b/synapse/handlers/auth.py @@ -469,7 +469,9 @@ class AuthHandler(BaseHandler): identity_handler = self.hs.get_handlers().identity_handler logger.info("Getting validated threepid. threepidcreds: %r", (threepid_creds,)) - if password_servlet and self.hs.config.email_password_reset_behaviour == "local": + if not password_servlet or self.hs.config.email_password_reset_behaviour == "remote": + threepid = yield identity_handler.threepid_from_creds(threepid_creds) + elif self.hs.config.email_password_reset_behaviour == "local": row = yield self.store.get_threepid_validation_session( medium, threepid_creds["client_secret"], @@ -485,8 +487,6 @@ class AuthHandler(BaseHandler): if row: # Valid threepid returned, delete from the db yield self.store.delete_threepid_session(threepid_creds["sid"]) - elif self.hs.config.password_reset_behaviour == "remote": - threepid = yield identity_handler.threepid_from_creds(threepid_creds) else: raise SynapseError(400, "Password resets are not enabled on this homeserver") |