From 8a02e064bd98569cdadfd52b9cca15fbf39e62cb Mon Sep 17 00:00:00 2001 From: Zoe Date: Fri, 1 May 2020 11:03:48 +0100 Subject: [PATCH 1/2] Don't erase password confirm on registration error Fixes: https://github.com/vector-im/riot-web/issues/11395 Problem here was that the form gets re-mounted but there wasn't a facility to preserve the password confirmation field. Since the form validates that the passwords are equal, if we mount with a password supplied we just copy it over. --- 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 f1624bc9e5..2a79bb8588 100644 --- a/src/components/views/auth/RegistrationForm.js +++ b/src/components/views/auth/RegistrationForm.js @@ -76,7 +76,7 @@ export default createReactClass({ email: this.props.defaultEmail || "", phoneNumber: this.props.defaultPhoneNumber || "", password: this.props.defaultPassword || "", - passwordConfirm: "", + passwordConfirm: this.props.defaultPassword || "", passwordComplexity: null, passwordSafe: false, }; From 0b5691c0032d5145c57925dc40fa6d090eb02da6 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 7 May 2020 09:43:14 +0100 Subject: [PATCH 2/2] Fix right panel hiding when viewing room member If you clicked on the header button whilst the right panel was showing a room member, it would NPE because there was no refireParams.member. It fires the same phase with no refireParams to toggle the panel visibility (apparently), so detect that case. Fixes https://github.com/vector-im/riot-web/issues/13571 --- src/stores/RightPanelStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stores/RightPanelStore.js b/src/stores/RightPanelStore.js index 8869d0be42..3a5605ba3f 100644 --- a/src/stores/RightPanelStore.js +++ b/src/stores/RightPanelStore.js @@ -139,7 +139,7 @@ export default class RightPanelStore extends Store { let targetPhase = payload.phase; let refireParams = payload.refireParams; // redirect to EncryptionPanel if there is an ongoing verification request - if (targetPhase === RIGHT_PANEL_PHASES.RoomMemberInfo) { + if (targetPhase === RIGHT_PANEL_PHASES.RoomMemberInfo && payload.refireParams) { const {member} = payload.refireParams; const pendingRequest = pendingVerificationRequestForUser(member); if (pendingRequest) {