From d47fb799a59c01d564c61631828f09b29c28ec14 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 30 Aug 2019 15:50:51 -0600 Subject: [PATCH 1/2] Disable MSISDN registration if the homeserver doesn't support it --- src/components/views/auth/RegistrationForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/auth/RegistrationForm.js b/src/components/views/auth/RegistrationForm.js index d3f275ffc3..68e0a4b99a 100644 --- a/src/components/views/auth/RegistrationForm.js +++ b/src/components/views/auth/RegistrationForm.js @@ -447,7 +447,7 @@ module.exports = React.createClass({ _showPhoneNumber() { const threePidLogin = !SdkConfig.get().disable_3pid_login; const haveIs = Boolean(this.props.serverConfig.isUrl); - if (!threePidLogin || !haveIs || !this._authStepIsUsed('m.login.msisdn')) { + if (!threePidLogin || (this.props.serverRequiresIdServer && !haveIs) || !this._authStepIsUsed('m.login.msisdn')) { return false; } return true; From 2bfffa76b57c993e491c199d97d7efabb486548c Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 30 Aug 2019 15:54:00 -0600 Subject: [PATCH 2/2] Appease the linter --- src/components/views/auth/RegistrationForm.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/views/auth/RegistrationForm.js b/src/components/views/auth/RegistrationForm.js index 68e0a4b99a..a226d29e6a 100644 --- a/src/components/views/auth/RegistrationForm.js +++ b/src/components/views/auth/RegistrationForm.js @@ -447,7 +447,8 @@ module.exports = React.createClass({ _showPhoneNumber() { const threePidLogin = !SdkConfig.get().disable_3pid_login; const haveIs = Boolean(this.props.serverConfig.isUrl); - if (!threePidLogin || (this.props.serverRequiresIdServer && !haveIs) || !this._authStepIsUsed('m.login.msisdn')) { + const haveRequiredIs = this.props.serverRequiresIdServer && !haveIs; + if (!threePidLogin || haveRequiredIs || !this._authStepIsUsed('m.login.msisdn')) { return false; } return true;