Skip to content

Commit

Permalink
Fix 2FA becoming enabled when the user inputs the wrong code during s…
Browse files Browse the repository at this point in the history
…etup (apache#7972)

(cherry picked from commit ef74221)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
  • Loading branch information
winterhazel authored and rohityadavcloud committed Oct 25, 2023
1 parent 5bcfb41 commit 0bf2711
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3251,7 +3251,7 @@ public void verifyUsingTwoFactorAuthenticationCode(final String code, final Long
_userDetailsDao.update(userDetailVO.getId(), userDetailVO);
}
} catch (CloudTwoFactorAuthenticationException e) {
UserDetailVO userDetailVO = _userDetailsDao.findDetail(userAccountId, "2FAsetupComplete");
UserDetailVO userDetailVO = _userDetailsDao.findDetail(userAccountId, UserDetailVO.Setup2FADetail);
if (userDetailVO != null && userDetailVO.getValue().equals(UserAccountVO.Setup2FAstatus.ENABLED.name())) {
disableTwoFactorAuthentication(userAccountId, caller, owner);
}
Expand Down

0 comments on commit 0bf2711

Please sign in to comment.