Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

_check_threepid in auth.py incorrect for MSISDN #6103

Closed
jryans opened this issue Sep 24, 2019 · 1 comment
Closed

_check_threepid in auth.py incorrect for MSISDN #6103

jryans opened this issue Sep 24, 2019 · 1 comment
Labels
z-privacy-sprint (Deprecated Label)

Comments

@jryans
Copy link
Contributor

jryans commented Sep 24, 2019

Looking at this snippet:

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.

@jryans
Copy link
Contributor Author

jryans commented Sep 25, 2019

Fixed by #6104

@jryans jryans closed this as completed Sep 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
z-privacy-sprint (Deprecated Label)
Projects
None yet
Development

No branches or pull requests

2 participants