diff --git a/src/admin/Bootstrap.Admin/Controllers/AccountController.cs b/src/admin/Bootstrap.Admin/Controllers/AccountController.cs index 730ac1f0..ca37bef0 100644 --- a/src/admin/Bootstrap.Admin/Controllers/AccountController.cs +++ b/src/admin/Bootstrap.Admin/Controllers/AccountController.cs @@ -146,6 +146,8 @@ namespace Bootstrap.Admin.Controllers [HttpPost] public async Task Login(string userName, string password, string remember) { + if (string.IsNullOrEmpty(userName) || string.IsNullOrEmpty(password)) return RedirectLogin(); + var auth = UserHelper.Authenticate(userName, password); HttpContext.Log(userName, auth); return auth ? await SignInAsync(userName, remember == "true") : View("Login", new LoginModel() { AuthFailed = true });