|
|
@@ -1,6 +1,9 @@
|
|
|
package com.uas.sso.sso.backend.service.impl;
|
|
|
|
|
|
+import static com.uas.sso.sso.backend.AuthenticationUtils.getEncryPassword;
|
|
|
+
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.uas.sso.core.Const;
|
|
|
import com.uas.sso.dao.AppealDao;
|
|
|
import com.uas.sso.dao.UserDao;
|
|
|
import com.uas.sso.dao.UserspaceDao;
|
|
|
@@ -150,11 +153,11 @@ public class AppealServiceImpl implements AppealService {
|
|
|
|
|
|
if (RESET_PASS.equals(appeal.getType())) {
|
|
|
String password = (String) map.get("password");
|
|
|
+ Assert.hasText(password, "申诉修改密码时,密码为必须字段");
|
|
|
+ boolean validPassword = password.length() >= 6 && password.length() <= 20;
|
|
|
+ Assert.isTrue(validPassword, "申诉修改密码时,提交的密码长度为6~20位");
|
|
|
|
|
|
- if (StringUtils.isEmpty(password) || password.length() < 32) {
|
|
|
- throw new ValidationFailedException("重置密码不存在或密码未被加密");
|
|
|
- }
|
|
|
- user.setPassword(password);
|
|
|
+ user.setPassword(getEncryPassword(Const.ENCRY_FORMAT, password, user.getSalt()));
|
|
|
}
|
|
|
userDao.save(user);
|
|
|
} else if (CHANGE_ADMIN.equals(appeal.getType())) {
|