From d049da696c811452e1322ce9d7e6f2ecd603f76f Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Wed, 8 May 2019 12:34:13 +0900 Subject: [PATCH] Fix exception thrown if user does not exist on login --- BTCPayServer/Controllers/AccountController.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/BTCPayServer/Controllers/AccountController.cs b/BTCPayServer/Controllers/AccountController.cs index 53d730c97..b4dded46a 100644 --- a/BTCPayServer/Controllers/AccountController.cs +++ b/BTCPayServer/Controllers/AccountController.cs @@ -100,6 +100,11 @@ namespace BTCPayServer.Controllers return View(model); } } + else + { + ModelState.AddModelError(string.Empty, "Invalid login attempt."); + return View(model); + } if (!await _userManager.IsLockedOutAsync(user) && await _u2FService.HasDevices(user.Id)) {