Commit f8633e15 authored by zengtianlai3's avatar zengtianlai3

解决敏感信息泄漏-两个列表

parent f2518ab7
...@@ -18,6 +18,7 @@ import iot.sixiang.license.model.vo.AppVo; ...@@ -18,6 +18,7 @@ import iot.sixiang.license.model.vo.AppVo;
import iot.sixiang.license.service.ApplyService; import iot.sixiang.license.service.ApplyService;
import iot.sixiang.license.xss.XssUtil; import iot.sixiang.license.xss.XssUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.DigestUtils;
import org.springframework.web.bind.WebDataBinder; import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -97,6 +98,9 @@ public class ApplyController { ...@@ -97,6 +98,9 @@ public class ApplyController {
pages = pages + 1; pages = pages + 1;
} }
List<AppVo> result = records.getResult(); List<AppVo> result = records.getResult();
for (AppVo u : result) {
u.setAppKey(DigestUtils.md5DigestAsHex(u.getAppKey().getBytes()));
}
return new PageResult(200, "查找成功", pageNo, pages, total, result); return new PageResult(200, "查找成功", pageNo, pages, total, result);
} }
} }
\ No newline at end of file
...@@ -19,6 +19,7 @@ import iot.sixiang.license.service.UserService; ...@@ -19,6 +19,7 @@ import iot.sixiang.license.service.UserService;
import iot.sixiang.license.util.CommonUtil; import iot.sixiang.license.util.CommonUtil;
import iot.sixiang.license.xss.XssUtil; import iot.sixiang.license.xss.XssUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.DigestUtils;
import org.springframework.web.bind.WebDataBinder; import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -145,6 +146,9 @@ public class UserController { ...@@ -145,6 +146,9 @@ public class UserController {
pages = pages + 1; pages = pages + 1;
} }
List<UserVo> result = records.getResult(); List<UserVo> result = records.getResult();
for (UserVo u : result) {
u.setPassword(DigestUtils.md5DigestAsHex(u.getPassword().getBytes()));
}
return new PageResult(200, "查找成功", pageNo, pages, total, result); return new PageResult(200, "查找成功", pageNo, pages, total, result);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment