diff --git a/src/admin/Bootstrap.Admin/Controllers/AccountController.cs b/src/admin/Bootstrap.Admin/Controllers/AccountController.cs index 3277c156..730ac1f0 100644 --- a/src/admin/Bootstrap.Admin/Controllers/AccountController.cs +++ b/src/admin/Bootstrap.Admin/Controllers/AccountController.cs @@ -93,6 +93,8 @@ namespace Bootstrap.Admin.Controllers [HttpPost()] public async Task Mobile([FromServices]ISMSProvider provider, string phone, string code) { + if (string.IsNullOrEmpty(phone) || string.IsNullOrEmpty(code)) return RedirectLogin(); + var auth = provider.Validate(phone, code); HttpContext.Log(phone, auth); if (auth)