enhancement
major
minor
defect
critical
major
minor
major
#30076
React Interface: Password change with confirmation message and validation before the identity prompt; protection against brute-force attacks on passwords and one-time codes
Context
In the React interface, a user changes their own password in their personal settings (User Menu → Settings → Security → "Change Password"); before making the change, they verify their identity by entering their current password. An administrator resets the password for another account in the account management section (“Reset Password”).
Previously
- the dialog would close without any message after a successful change;
- an incorrect repetition or a password that was too short was only reported after the current password had been entered,
- setting the currently valid password was accepted as a successful change,
- passwords could be guessed as often as desired and without delay during React login, identity verification, and one-time codes (OTP). In contrast, the classic login process imposes a delay after repeated failed attempts.
Behavior
Confirmation. After a successful change, a message appears: “Your password has been changed.” Or, if reset by the administrator, “The password for <account> has been set.” In the case of a forced password change during login (expired password), the login process continues as before without a message.
Check Before Identity Verification. Inconsistent password repeats, blank passwords, and violations of the password policy (length, character classes) are reported before the current password is requested. Whether the new password has been used before is intentionally checked only after identity has been confirmed: the response provides information about the account’s previous passwords and should not be retrievable during an unattended session without identity verification.
Reuse. The currently valid password is considered to have already been used and is rejected as if it were a password from the history (“Password has been used before and may not be used again.”), provided that a repeat lock (repeat-cycle > 0) is configured. This applies to user-initiated changes, forced changes during login, and resets performed by the administrator.
Protection against Brute-Force Attacks. After repeated failed attempts, further attempts are rejected for an increasing period of time without being verified (“Too many failed login attempts … Please wait N seconds …”):
- React login and identity verification are counted collectively per account and client address, along with the classic login;
- the one-time code (two-factor authentication and setup) is counted per secret, as in the classic interface.
Technical
- change-password.view.xml / admin/access-control/reset-password.view.xml: <notify> after the change.
- New action <check-password-change/> (CheckPasswordChangeAction) before <verify-identity/>; it shares its checks with ChangePasswordApplyAction, which performs them itself for the forced password change. Constants LoginAction.NEW_PASSWORD_ATTR / NEW_PASSWORD_CONFIRM_ATTR.
- DBAuthenticationAccessDevice.setPassword() checks the current hash in addition to the history.
- LoginFailuresModule: shared bridge between attempt() and checkRetry() / recordAttempt() with RetryDeniedException, keys accountKey() / secretKey(). Used by LoginAction, VerifyOtpAction, VerifyIdentityAction, and unchanged in the behavior of LoginViewDialog and CheckOTPDialog.
- PasswordPromptDialogControl: Instead of a boolean value, the verifier returns the message to be displayed (Verifier) so that the wait time appears below the field. VerifyIdentityAction.createVerifier() is now called createPasswordCheck(), and attemptKey() is new.
- The English text of the two wait messages has been linguistically corrected.