Commit 24c8cb0f authored by zengtianlai3's avatar zengtianlai3

xss 测试

parent 267d5231
...@@ -25,6 +25,7 @@ import iot.sixiang.license.service.AlarmReadService; ...@@ -25,6 +25,7 @@ import iot.sixiang.license.service.AlarmReadService;
import iot.sixiang.license.service.AlarmService; import iot.sixiang.license.service.AlarmService;
import iot.sixiang.license.service.MonitorService; import iot.sixiang.license.service.MonitorService;
import iot.sixiang.license.service.ServerService; import iot.sixiang.license.service.ServerService;
import iot.sixiang.license.xss.XssUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.owasp.esapi.ESAPI; import org.owasp.esapi.ESAPI;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -101,6 +102,7 @@ public class OperateController { ...@@ -101,6 +102,7 @@ public class OperateController {
public ResResult<List<AlarmVo>> getAlarmList() { public ResResult<List<AlarmVo>> getAlarmList() {
String user = UserUtils.getLoginUserId(); String user = UserUtils.getLoginUserId();
int userI = Integer.valueOf(user); int userI = Integer.valueOf(user);
userI = Integer.valueOf(XssUtil.checkXSS(String.valueOf(userI)));
List<AlarmVo> alarmList = alarmService.getAlarmList(userI); List<AlarmVo> alarmList = alarmService.getAlarmList(userI);
return ResResult.success().goRecord(alarmList); return ResResult.success().goRecord(alarmList);
} }
......
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