Skip to content

Commit ef74221

Browse files
authored
Fix 2FA becoming enabled when the user inputs the wrong code during setup (apache#7972)
1 parent 951ba04 commit ef74221

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
@@ -3259,7 +3259,7 @@ public void verifyUsingTwoFactorAuthenticationCode(final String code, final Long
32593259
_userDetailsDao.update(userDetailVO.getId(), userDetailVO);
32603260
}
32613261
} catch (CloudTwoFactorAuthenticationException e) {
3262-
UserDetailVO userDetailVO = _userDetailsDao.findDetail(userAccountId, "2FAsetupComplete");
3262+
UserDetailVO userDetailVO = _userDetailsDao.findDetail(userAccountId, UserDetailVO.Setup2FADetail);
32633263
if (userDetailVO != null && userDetailVO.getValue().equals(UserAccountVO.Setup2FAstatus.ENABLED.name())) {
32643264
disableTwoFactorAuthentication(userAccountId, caller, owner);
32653265
}

0 commit comments

Comments
 (0)