From 2a32b05df113d45b8a6f8d891e3c0d40810d7ea1 Mon Sep 17 00:00:00 2001 From: Kukks Date: Sat, 17 Oct 2020 09:25:48 +0200 Subject: [PATCH] fix forgot password If Email verification is turned off but you requested a forgot password form, it would ignore the request internally. Seems like it has been this way since the beginning --- BTCPayServer/Controllers/AccountController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BTCPayServer/Controllers/AccountController.cs b/BTCPayServer/Controllers/AccountController.cs index 524a45642..3c2ac509f 100644 --- a/BTCPayServer/Controllers/AccountController.cs +++ b/BTCPayServer/Controllers/AccountController.cs @@ -537,7 +537,7 @@ namespace BTCPayServer.Controllers if (ModelState.IsValid) { var user = await _userManager.FindByEmailAsync(model.Email); - if (user == null || !(await _userManager.IsEmailConfirmedAsync(user))) + if (user == null || (user.RequiresEmailConfirmation && !(await _userManager.IsEmailConfirmedAsync(user)))) { // Don't reveal that the user does not exist or is not confirmed return RedirectToAction(nameof(ForgotPasswordConfirmation));