From 00beb9890ccafcab3b696febf392b99ad67bb073 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=81=9A=E7=A0=81=E5=86=9C?= <599854767@qq.com> Date: Tue, 21 Mar 2023 11:13:12 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E7=99=BB=E5=BD=95=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E9=AA=8C=E8=AF=81=E7=A0=81=E6=A0=A1=E9=AA=8C=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ZR.Admin.WebApi/Controllers/System/SysLoginController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ZR.Admin.WebApi/Controllers/System/SysLoginController.cs b/ZR.Admin.WebApi/Controllers/System/SysLoginController.cs index a64ec93..587ddc1 100644 --- a/ZR.Admin.WebApi/Controllers/System/SysLoginController.cs +++ b/ZR.Admin.WebApi/Controllers/System/SysLoginController.cs @@ -73,7 +73,7 @@ namespace ZR.Admin.WebApi.Controllers.System if (loginBody == null) { throw new CustomException("请求参数错误"); } loginBody.LoginIP = HttpContextExtension.GetClientUserIp(HttpContext); SysConfig sysConfig = sysConfigService.GetSysConfigByKey("sys.account.captchaOnOff"); - if (sysConfig?.ConfigValue != "off" && SecurityCodeHelper.Validate(loginBody.Uuid, loginBody.Code)) + if (sysConfig?.ConfigValue != "off" && !SecurityCodeHelper.Validate(loginBody.Uuid, loginBody.Code)) { return ToResponse(ResultCode.CAPTCHA_ERROR, "验证码错误"); } @@ -198,7 +198,7 @@ namespace ZR.Admin.WebApi.Controllers.System return ToResponse(ResultCode.CUSTOM_ERROR, "当前系统没有开启注册功能!"); } SysConfig sysConfig = sysConfigService.GetSysConfigByKey("sys.account.captchaOnOff"); - if (sysConfig?.ConfigValue != "off" && SecurityCodeHelper.Validate(dto.Uuid, dto.Code)) + if (sysConfig?.ConfigValue != "off" && !SecurityCodeHelper.Validate(dto.Uuid, dto.Code)) { return ToResponse(ResultCode.CAPTCHA_ERROR, "验证码错误"); }