mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 08:02:49 -05:00
CheckPoliciesOnTwoFactorRemoval
for 2fa recovery (#659)
This commit is contained in:
@ -359,7 +359,8 @@ namespace Bit.Api.Controllers
|
||||
[AllowAnonymous]
|
||||
public async Task PostRecover([FromBody]TwoFactorRecoveryRequestModel model)
|
||||
{
|
||||
if(!await _userService.RecoverTwoFactorAsync(model.Email, model.MasterPasswordHash, model.RecoveryCode))
|
||||
if(!await _userService.RecoverTwoFactorAsync(model.Email, model.MasterPasswordHash, model.RecoveryCode,
|
||||
_organizationService))
|
||||
{
|
||||
await Task.Delay(2000);
|
||||
throw new BadRequestException(string.Empty, "Invalid information. Try again.");
|
||||
|
Reference in New Issue
Block a user