From 34384b7c32e82081ac43580ce664075d9de80f6d Mon Sep 17 00:00:00 2001 From: SHIBAHARA Hiroki Date: Thu, 18 Jul 2024 18:11:58 +0900 Subject: [PATCH] The repeat check for New Password is performed only when New Password is entered. This would make the current password less mandatory and allow the email change logic to work. fix #3193 --- client/utils/reduxFormUtils.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/utils/reduxFormUtils.js b/client/utils/reduxFormUtils.js index 94962fbc71..cb2d88b495 100644 --- a/client/utils/reduxFormUtils.js +++ b/client/utils/reduxFormUtils.js @@ -51,7 +51,10 @@ export function validateSettings(formProps) { if (formProps.newPassword && formProps.newPassword.length < 6) { errors.newPassword = i18n.t('ReduxFormUtils.errorShortPassword'); } - if (formProps.currentPassword === formProps.newPassword) { + if ( + formProps.newPassword && + formProps.currentPassword === formProps.newPassword + ) { errors.newPassword = i18n.t('ReduxFormUtils.errorNewPasswordRepeat'); } return errors;