From feab5128edad4c63c35023c8bfe0f65d284463a4 Mon Sep 17 00:00:00 2001 From: lijiarao Date: Mon, 27 Sep 2021 18:49:08 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=96=B0=E5=A2=9E=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=97=B6=E6=B2=A1=E6=9C=89=E5=A4=84=E7=90=86=E9=82=AE=E7=AE=B1?= =?UTF-8?q?=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/jero/modules/system/controller/SysUserController.java | 3 +++ 1 file changed, 3 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 ef69e10d..fee0b16d 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 @@ -293,10 +293,12 @@ public class SysUserController { String rsaPrivateKey = String.valueOf(redisUtil.get(rsaPublicKey)); SysUser user = JSON.parseObject(jsonObject.toJSONString(), SysUser.class); String email; + String emailPassword; String phone; try { //1:先用私钥解密数据 email = CommonUtils.decryptBtRsaPriKey(user.getEmail(), rsaPrivateKey); + emailPassword = CommonUtils.decryptBtRsaPriKey(user.getEmailPassword(), rsaPrivateKey); phone = CommonUtils.decryptBtRsaPriKey(user.getPhone(), rsaPrivateKey); } catch (Exception e) { throw new JeroBootException("解密失败!", e); @@ -308,6 +310,7 @@ public class SysUserController { //3:把数据加密在放回来 user.setEmail(PasswordUtil.encrypt(email)); user.setPhone(PasswordUtil.encrypt(phone)); + user.setEmailPassword(PasswordUtil.encrypt(emailPassword)); if (!confirmPassword.equals(user.getPassword())) { throw new JeroBootException("两次密码输入不一致"); }