fix bug 40381 修改密码--密码没有加密

This commit is contained in:
lijiarao
2021-10-13 09:58:41 +08:00
parent a01ccffc71
commit 401dd7412b
@@ -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<SysUser>().eq(SysUser::getUsername, username));
if(user==null) {
return Result.error("用户不存在!");