Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ioc_sixiang_license
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zengtianlai3
ioc_sixiang_license
Commits
0ec124a2
Commit
0ec124a2
authored
Jul 16, 2022
by
zengtianlai3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.1.1 跨站脚本:反射型XSS
parent
c9c45b60
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
13 deletions
+11
-13
EncryptController.java
...ava/iot/sixiang/license/controller/EncryptController.java
+2
-6
MaskingController.java
...ava/iot/sixiang/license/controller/MaskingController.java
+5
-6
OperateController.java
...ava/iot/sixiang/license/controller/OperateController.java
+3
-0
AlarmServiceImpl.java
...va/iot/sixiang/license/service/impl/AlarmServiceImpl.java
+1
-1
No files found.
license/src/main/java/iot/sixiang/license/controller/EncryptController.java
View file @
0ec124a2
...
...
@@ -9,12 +9,8 @@ import iot.sixiang.license.model.vo.EncryptVo;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.lang.reflect.InvocationTargetException
;
import
org.springframework.web.bind.WebDataBinder
;
import
org.springframework.web.bind.annotation.*
;
/**
* Title: EncryptController
...
...
license/src/main/java/iot/sixiang/license/controller/MaskingController.java
View file @
0ec124a2
...
...
@@ -7,11 +7,10 @@ import iot.sixiang.license.model.ResResult;
import
iot.sixiang.license.model.vo.MaskingVo
;
import
iot.sixiang.license.util.CommonUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.owasp.esapi.ESAPI
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.WebDataBinder
;
import
org.springframework.web.bind.annotation.*
;
/**
* Title: MaskingController
...
...
@@ -44,8 +43,8 @@ public class MaskingController {
}
MaskingVo
vo
=
new
MaskingVo
();
vo
.
setUserName
(
ESAPI
.
encoder
().
encodeFor
HTML
(
CommonUtil
.
nameDesensitization
(
maskingVo
.
getUserName
())));
vo
.
setIdCard
(
CommonUtil
.
idCardEncrypt
(
maskingVo
.
getIdCard
(
)));
vo
.
setUserName
(
ESAPI
.
encoder
().
encodeFor
DN
(
CommonUtil
.
nameDesensitization
(
maskingVo
.
getUserName
())));
vo
.
setIdCard
(
ESAPI
.
encoder
().
encodeForDN
(
CommonUtil
.
idCardEncrypt
(
maskingVo
.
getIdCard
()
)));
return
ResResult
.
success
().
goRecord
(
vo
);
}
...
...
license/src/main/java/iot/sixiang/license/controller/OperateController.java
View file @
0ec124a2
...
...
@@ -104,6 +104,9 @@ public class OperateController {
String
user
=
UserUtils
.
getLoginUserId
();
int
userI
=
Integer
.
valueOf
(
user
);
List
<
AlarmVo
>
alarmList
=
alarmService
.
getAlarmList
(
userI
);
for
(
AlarmVo
alarmVo
:
alarmList
)
{
alarmVo
.
setLevelDescribe
(
ESAPI
.
encoder
().
encodeForHTML
(
alarmVo
.
getLevelDescribe
()));
}
return
ResResult
.
success
().
goRecord
(
alarmList
);
}
...
...
license/src/main/java/iot/sixiang/license/service/impl/AlarmServiceImpl.java
View file @
0ec124a2
...
...
@@ -34,7 +34,7 @@ public class AlarmServiceImpl extends ServiceImpl<AlarmMapper, Alarm> implements
alarmVos
=
alarmVos
.
stream
().
sorted
(
Comparator
.
comparing
(
AlarmVo:
:
getCreateTime
,
Comparator
.
reverseOrder
())).
collect
(
Collectors
.
toList
());
if
(
alarmVos
!=
null
&&
!
alarmVos
.
isEmpty
())
{
for
(
AlarmVo
alarmVo
:
alarmVos
)
{
alarmVo
.
setContent
(
ESAPI
.
encoder
().
encodeFor
HTML
(
alarmVo
.
getContent
()));
alarmVo
.
setContent
(
ESAPI
.
encoder
().
encodeFor
DN
(
alarmVo
.
getContent
()));
}
}
return
alarmVos
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment