This is an automated email from the ASF dual-hosted git repository. weizhou pushed a commit to branch 4.20 in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.20 by this push: new 6868f052de4 2fa: log error on totp mismatch (#10734) 6868f052de4 is described below commit 6868f052de49fb8342bfb074cab3a30da1b83165 Author: Abhishek Kumar <abhishek.mr...@gmail.com> AuthorDate: Mon Sep 8 14:36:22 2025 +0530 2fa: log error on totp mismatch (#10734) Addresses #9515 Signed-off-by: Abhishek Kumar <abhishek.mr...@gmail.com> --- .../org/apache/cloudstack/auth/TotpUserTwoFactorAuthenticator.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/user-two-factor-authenticators/totp/src/main/java/org/apache/cloudstack/auth/TotpUserTwoFactorAuthenticator.java b/plugins/user-two-factor-authenticators/totp/src/main/java/org/apache/cloudstack/auth/TotpUserTwoFactorAuthenticator.java index c7c4997f189..b722bd14393 100644 --- a/plugins/user-two-factor-authenticators/totp/src/main/java/org/apache/cloudstack/auth/TotpUserTwoFactorAuthenticator.java +++ b/plugins/user-two-factor-authenticators/totp/src/main/java/org/apache/cloudstack/auth/TotpUserTwoFactorAuthenticator.java @@ -54,7 +54,9 @@ public class TotpUserTwoFactorAuthenticator extends AdapterBase implements UserT logger.info("2FA matches user's input"); return; } - throw new CloudTwoFactorAuthenticationException("two-factor authentication code provided is invalid"); + String msg = "two-factor authentication code provided is invalid"; + logger.error(msg); + throw new CloudTwoFactorAuthenticationException(msg); } private String get2FAKey(UserAccount userAccount) {