1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 08:02:49 -05:00

disable verification on send-email and reenable on put email

This commit is contained in:
Jake Fink
2024-07-17 15:30:29 -04:00
parent 2ad59f56ea
commit 8fafea6056

View File

@ -296,7 +296,7 @@ public class TwoFactorController : Controller
[HttpPost("send-email")]
public async Task SendEmail([FromBody] TwoFactorEmailRequestModel model)
{
var user = await CheckAsync(model, false);
var user = await CheckAsync(model, false, false);
model.ToUser(user);
await _userService.SendTwoFactorEmailAsync(user);
}
@ -349,7 +349,7 @@ public class TwoFactorController : Controller
[HttpPost("email")]
public async Task<TwoFactorEmailResponseModel> PutEmail([FromBody] UpdateTwoFactorEmailRequestModel model)
{
var user = await CheckAsync(model, false, false);
var user = await CheckAsync(model, false);
model.ToUser(user);
if (!await _userManager.VerifyTwoFactorTokenAsync(user,