Fix exception thrown if user does not exist on login

This commit is contained in:
nicolas.dorier
2019-05-08 12:34:13 +09:00
parent 5a46d0e80d
commit d049da696c

View File

@@ -100,6 +100,11 @@ namespace BTCPayServer.Controllers
return View(model); return View(model);
} }
} }
else
{
ModelState.AddModelError(string.Empty, "Invalid login attempt.");
return View(model);
}
if (!await _userManager.IsLockedOutAsync(user) && await _u2FService.HasDevices(user.Id)) if (!await _userManager.IsLockedOutAsync(user) && await _u2FService.HasDevices(user.Id))
{ {