fix bug 40381 修改密码--密码没有加密
This commit is contained in:
+9
@@ -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("用户不存在!");
|
||||
|
||||
Reference in New Issue
Block a user