mirror of https://github.com/apache/cloudstack.git
Fix 2FA becoming enabled when the user inputs the wrong code during setup (#7972)
(cherry picked from commit ef742210b5)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
1fdaec5c90
commit
4f86c452de
|
|
@ -3251,7 +3251,7 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M
|
|||
_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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue