Skip to content

Commit 0bf2711

Browse files
winterhazelrohityadavcloud
authored andcommitted
Fix 2FA becoming enabled when the user inputs the wrong code during setup (apache#7972)
(cherry picked from commit ef74221) Signed-off-by: Rohit Yadav <[email protected]>
1 parent 5bcfb41 commit 0bf2711

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/main/java/com/cloud/user/AccountManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3251,7 +3251,7 @@ public void verifyUsingTwoFactorAuthenticationCode(final String code, final Long
32513251
_userDetailsDao.update(userDetailVO.getId(), userDetailVO);
32523252
}
32533253
} catch (CloudTwoFactorAuthenticationException e) {
3254-
UserDetailVO userDetailVO = _userDetailsDao.findDetail(userAccountId, "2FAsetupComplete");
3254+
UserDetailVO userDetailVO = _userDetailsDao.findDetail(userAccountId, UserDetailVO.Setup2FADetail);
32553255
if (userDetailVO != null && userDetailVO.getValue().equals(UserAccountVO.Setup2FAstatus.ENABLED.name())) {
32563256
disableTwoFactorAuthentication(userAccountId, caller, owner);
32573257
}

0 commit comments

Comments
 (0)