From 6d9fbd15da9c0460d7601033a1ab73dd37c10ed3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=87=AA=E5=B8=A6=E5=A4=A7=E4=BD=AC=E6=B0=94=E5=9C=BA?= <188633308@qq.com> Date: Fri, 2 Jul 2021 21:25:28 +0800 Subject: [PATCH] fix --- Api/Ewide.Core/Service/Auth/AuthService.cs | 7 +------ web-react/src/views/login/index.jsx | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Api/Ewide.Core/Service/Auth/AuthService.cs b/Api/Ewide.Core/Service/Auth/AuthService.cs index 08c6da5..5728f2d 100644 --- a/Api/Ewide.Core/Service/Auth/AuthService.cs +++ b/Api/Ewide.Core/Service/Auth/AuthService.cs @@ -107,12 +107,7 @@ namespace Ewide.Core.Service var pattern = App.Configuration.GetSection("SimplePassword:Pattern").Value; if (!Regex.Match(newPassword, pattern).Success) { - return new LoginOutput - { - Passed = false, - Pattern = pattern, - Descriptions = App.Configuration.GetSection("SimplePassword:Descriptions").Value - }; + throw Oops.Oh("新密码强度不符合规则"); } newPassword = MD5Encryption.Encrypt(newPassword); diff --git a/web-react/src/views/login/index.jsx b/web-react/src/views/login/index.jsx index ce8ca80..0e9b331 100644 --- a/web-react/src/views/login/index.jsx +++ b/web-react/src/views/login/index.jsx @@ -197,7 +197,7 @@ export default class index extends Component { label="新密码" rules={[ { required: true, message: '请输入新密码' }, - // { pattern, message: '密码格式错误' }, + { pattern, message: '密码格式错误' }, ]} name="newPassword" tooltip={descriptions}