|
@@ -12,6 +12,8 @@ import cn.com.qmth.stmms.common.enums.Role;
|
|
import cn.com.qmth.stmms.common.enums.UserSource;
|
|
import cn.com.qmth.stmms.common.enums.UserSource;
|
|
import cn.com.qmth.stmms.common.utils.EncryptUtils;
|
|
import cn.com.qmth.stmms.common.utils.EncryptUtils;
|
|
import cn.com.qmth.stmms.common.utils.RequestUtils;
|
|
import cn.com.qmth.stmms.common.utils.RequestUtils;
|
|
|
|
+
|
|
|
|
+import org.apache.commons.lang.StringEscapeUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
@@ -22,6 +24,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
+
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
import java.util.HashSet;
|
|
import java.util.HashSet;
|
|
import java.util.Set;
|
|
import java.util.Set;
|
|
@@ -97,7 +100,8 @@ public class UserController extends BaseController {
|
|
if (previous == null) {
|
|
if (previous == null) {
|
|
String message = validate(user, subjectCodeString);
|
|
String message = validate(user, subjectCodeString);
|
|
if (message == null) {
|
|
if (message == null) {
|
|
- user.setPassword(EncryptUtils.md5(user.getPassword()));
|
|
|
|
|
|
+ String password = StringEscapeUtils.unescapeHtml(user.getPassword());
|
|
|
|
+ user.setPassword(EncryptUtils.md5(password));
|
|
user.setSchoolId(current.getSchoolId());
|
|
user.setSchoolId(current.getSchoolId());
|
|
user.setSource(UserSource.INTERNAL);
|
|
user.setSource(UserSource.INTERNAL);
|
|
user.setCreatedTime(new Date());
|
|
user.setCreatedTime(new Date());
|
|
@@ -116,7 +120,8 @@ public class UserController extends BaseController {
|
|
previous.setLoginName(user.getLoginName());
|
|
previous.setLoginName(user.getLoginName());
|
|
previous.setName(user.getName());
|
|
previous.setName(user.getName());
|
|
if (StringUtils.isNotBlank(user.getPassword())) {
|
|
if (StringUtils.isNotBlank(user.getPassword())) {
|
|
- previous.setPassword(EncryptUtils.md5(user.getPassword()));
|
|
|
|
|
|
+ String password = StringEscapeUtils.unescapeHtml(user.getPassword());
|
|
|
|
+ previous.setPassword(EncryptUtils.md5(password));
|
|
}
|
|
}
|
|
previous.setEnable(user.isEnable());
|
|
previous.setEnable(user.isEnable());
|
|
String message = validate(previous, subjectCodeString);
|
|
String message = validate(previous, subjectCodeString);
|