This repository was archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
_check_threepid in auth.py incorrect for MSISDN #6103
Copy link
Copy link
Closed
Labels
z-privacy-sprint(Deprecated Label)(Deprecated Label)
Description
Looking at this snippet:
synapse/synapse/handlers/auth.py
Lines 446 to 463 in f99a9c9
if self.hs.config.threepid_behaviour_email == ThreepidBehaviour.REMOTE: | |
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, | |
threepid_creds["client_secret"], | |
sid=threepid_creds["sid"], | |
validated=True, | |
) |
...the MSISDN handling should not depend on the threepid_behaviour_email
setting. Instead, we should use the MSISDN delegate if it exists or else fail.
Riot Web hits this block when trying to provide a MSISDN during registration.
Metadata
Metadata
Assignees
Labels
z-privacy-sprint(Deprecated Label)(Deprecated Label)