From 944e372e1e4b44a9bdc1692240544d49d16ee5c6 Mon Sep 17 00:00:00 2001 From: zuohuaijun Date: Thu, 8 Aug 2024 10:19:20 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=98=8E=E8=B0=83=E6=95=B4=E5=AF=86?= =?UTF-8?q?=E7=A0=81=E9=94=99=E8=AF=AF=E6=AC=A1=E6=95=B0=E6=9C=80=E5=A4=A7?= =?UTF-8?q?=E4=B8=BA10=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs b/Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs index 33b8327a..b979c08a 100644 --- a/Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs @@ -66,9 +66,9 @@ public class SysAuthService : IDynamicApiController, ITransient var keyPasswordErrorTimes = $"{CacheConst.KeyPasswordErrorTimes}{input.Account}"; var passwordErrorTimes = _sysCacheService.Get(keyPasswordErrorTimes); var passwordMaxErrorTimes = await _sysConfigService.GetConfigValue(ConfigConst.SysPasswordMaxErrorTimes); - // 若未配置或误配置为0、负数, 则正确密码也无法登录 + // 若未配置或误配置为0、负数, 则默认密码错误次数最大为10次 if (passwordMaxErrorTimes < 1) - passwordMaxErrorTimes = 1; + passwordMaxErrorTimes = 10; if (passwordErrorTimes > passwordMaxErrorTimes) throw Oops.Oh(ErrorCodeEnum.D1027);