From 401dd7412b69300b9b39935c9b124fb70d422a30 Mon Sep 17 00:00:00 2001 From: lijiarao Date: Wed, 13 Oct 2021 09:58:41 +0800 Subject: [PATCH] =?UTF-8?q?fix=20bug=2040381=20=E4=BF=AE=E6=94=B9=E5=AF=86?= =?UTF-8?q?=E7=A0=81--=E5=AF=86=E7=A0=81=E6=B2=A1=E6=9C=89=E5=8A=A0?= =?UTF-8?q?=E5=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/system/controller/SysUserController.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysUserController.java b/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysUserController.java index bfd3c3ef..468b5546 100644 --- a/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysUserController.java +++ b/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysUserController.java @@ -873,6 +873,15 @@ public class SysUserController { String oldPassword = json.getString("oldpassword"); String password = json.getString("password"); String confirmPassword = json.getString("confirmpassword"); + String RSAPublicKey = json.getString("rsaPublicKey"); + String RSAPrivateKey = String.valueOf(redisUtil.get(RSAPublicKey)); + try { + oldPassword = CommonUtils.decryptBtRsaPriKey(oldPassword, RSAPrivateKey); + password = CommonUtils.decryptBtRsaPriKey(password, RSAPrivateKey); + confirmPassword = CommonUtils.decryptBtRsaPriKey(confirmPassword, RSAPrivateKey); + }catch (Exception e){ + log.error(e.getMessage(),e); + } SysUser user = this.sysUserService.getOne(new LambdaQueryWrapper().eq(SysUser::getUsername, username)); if(user==null) { return Result.error("用户不存在!");