diff options
author | Neil Johnson <neil@matrix.org> | 2019-01-21 14:59:37 +0000 |
---|---|---|
committer | Neil Johnson <neil@matrix.org> | 2019-01-21 14:59:37 +0000 |
commit | 534926230257ef65b683f439dd71156c359d5004 (patch) | |
tree | ffc9b4b2df8d4dd78fa7b937de58e706bfc9628d /synapse/rest | |
parent | Merge pull request #4390 from matrix-org/erikj/versioned_fed_apis (diff) | |
download | synapse-534926230257ef65b683f439dd71156c359d5004.tar.xz |
Config option to disable requesting MSISDN on registration
Diffstat (limited to 'synapse/rest')
-rw-r--r-- | synapse/rest/client/v2_alpha/register.py | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/synapse/rest/client/v2_alpha/register.py b/synapse/rest/client/v2_alpha/register.py index aec0c6b075..14025cd219 100644 --- a/synapse/rest/client/v2_alpha/register.py +++ b/synapse/rest/client/v2_alpha/register.py @@ -309,22 +309,16 @@ class RegisterRestServlet(RestServlet): assigned_user_id=registered_user_id, ) - # Only give msisdn flows if the x_show_msisdn flag is given: - # this is a hack to work around the fact that clients were shipped - # that use fallback registration if they see any flows that they don't - # recognise, which means we break registration for these clients if we - # advertise msisdn flows. Once usage of Riot iOS <=0.3.9 and Riot - # Android <=0.6.9 have fallen below an acceptable threshold, this - # parameter should go away and we should always advertise msisdn flows. - show_msisdn = False - if 'x_show_msisdn' in body and body['x_show_msisdn']: - show_msisdn = True - # FIXME: need a better error than "no auth flow found" for scenarios # where we required 3PID for registration but the user didn't give one require_email = 'email' in self.hs.config.registrations_require_3pid require_msisdn = 'msisdn' in self.hs.config.registrations_require_3pid + show_msisdn = True + if self.hs.config.disable_msisdn_registration: + show_msisdn = False + require_msisdn = False + flows = [] if self.hs.config.enable_registration_captcha: # only support 3PIDless registration if no 3PIDs are required |