From 68b5009e9732796ccb6c7cf65651dccd9a819ca9 Mon Sep 17 00:00:00 2001 From: Argo-MacBookPro Date: Wed, 24 Oct 2018 17:57:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9BUG=EF=BC=9ALogin=20Web=20api?= =?UTF-8?q?=E5=AF=B9post=E6=95=B0=E6=8D=AE=E8=BF=9B=E8=A1=8C=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E5=90=8E=E5=86=8D=E4=BC=A0=E5=85=A5Authenticate?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/Controllers/Api/LoginController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bootstrap.Admin/Controllers/Api/LoginController.cs b/Bootstrap.Admin/Controllers/Api/LoginController.cs index 6aa4661b..3339ba6b 100644 --- a/Bootstrap.Admin/Controllers/Api/LoginController.cs +++ b/Bootstrap.Admin/Controllers/Api/LoginController.cs @@ -27,7 +27,7 @@ namespace Bootstrap.Admin.Controllers.Api dynamic user = value; string userName = user.userName; string password = user.password; - if (UserHelper.Authenticate(userName, password)) + if (!string.IsNullOrEmpty(userName) && !string.IsNullOrEmpty(password) && UserHelper.Authenticate(userName, password)) { return BootstrapAdminJwtTokenHandler.CreateToken(userName); }