|
@@ -257,8 +257,8 @@ public class UserApiController {
|
|
|
@AnonymousPostMapping(value = "/edit/zkuser/pass")
|
|
|
public BaseResponse<Object> editzkuser(@RequestBody QueryPageParams<UserMessage> params) throws Exception{
|
|
|
SecurityUtils.CheckApiAuth(params);
|
|
|
- String oldPass = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey, RsaUtils.encryptByPublicKey(RsaProperties.publicKey,params.getQuery().getOldPass()));
|
|
|
- String newPass = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey,RsaUtils.encryptByPublicKey(RsaProperties.publicKey,params.getQuery().getNewPass()));
|
|
|
+ String oldPass = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey, params.getQuery().getOldPass());
|
|
|
+ String newPass = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey,params.getQuery().getNewPass());
|
|
|
Map<String,String> map = userRepository.findUserById(params.getQuery().getUserId());
|
|
|
User user = JSONObject.parseObject(JSONObject.toJSONString(map), User.class);
|
|
|
if(!passwordEncoder.matches(oldPass, map.get("password"))){
|