From 3640bc70aacfb47669dbe2362e7f2483504d18fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=81=E5=A4=A7=E4=BE=A0?= Date: Mon, 16 May 2022 12:03:12 +0000 Subject: [PATCH] =?UTF-8?q?update=20ZR.Admin.WebApi/Controllers/System/Sys?= =?UTF-8?q?ProfileController.cs.=20=E4=BF=AE=E6=94=B9=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E8=BF=87=E7=A8=8B=E5=87=BA=E9=94=99=EF=BC=8C=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E4=BF=9D=E5=AD=98=E7=9A=84=E6=98=AF=E5=B0=8F=E5=86=99?= =?UTF-8?q?=EF=BC=8C=E8=BF=99=E9=87=8ColdMd5=E5=92=8CnewMd5=E6=98=AF?= =?UTF-8?q?=E5=A4=A7=E5=86=99=E5=AD=97=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/System/SysProfileController.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ZR.Admin.WebApi/Controllers/System/SysProfileController.cs b/ZR.Admin.WebApi/Controllers/System/SysProfileController.cs index bfbda91..df0d325 100644 --- a/ZR.Admin.WebApi/Controllers/System/SysProfileController.cs +++ b/ZR.Admin.WebApi/Controllers/System/SysProfileController.cs @@ -1,4 +1,4 @@ -using Infrastructure; +using Infrastructure; using Infrastructure.Attribute; using Infrastructure.Enums; using Infrastructure.Model; @@ -98,15 +98,15 @@ namespace ZR.Admin.WebApi.Controllers.System SysUser user = UserService.SelectUserById(loginUser.UserId); string oldMd5 = NETCore.Encrypt.EncryptProvider.Md5(oldPassword); string newMd5 = NETCore.Encrypt.EncryptProvider.Md5(newPassword); - if (user.Password != oldMd5) + if (user.Password != oldMd5.ToLower()) { return ToResponse(ApiResult.Error("修改密码失败,旧密码错误")); } - if (user.Password == newMd5) + if (user.Password == newMd5.ToLower()) { return ToResponse(ApiResult.Error("新密码不能和旧密码相同")); } - if (UserService.ResetPwd(loginUser.UserId, newMd5) > 0) + if (UserService.ResetPwd(loginUser.UserId, newMd5.ToLower()) > 0) { //TODO 更新缓存