Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
finance-manage
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
finance-oa
finance-manage
Commits
098c6506
Commit
098c6506
authored
Aug 24, 2021
by
Ming
Committed by
Gitee
Aug 24, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update ruoyi-common/src/main/java/com/ruoyi/common/filter/XssHttpServletRequestWrapper.java.
增加available方法于XssHttpServletRequestWrapper
parent
e52092c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
ruoyi-common/src/main/java/com/ruoyi/common/filter/XssHttpServletRequestWrapper.java
...com/ruoyi/common/filter/XssHttpServletRequestWrapper.java
+7
-1
No files found.
ruoyi-common/src/main/java/com/ruoyi/common/filter/XssHttpServletRequestWrapper.java
View file @
098c6506
...
...
@@ -63,7 +63,8 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper
// xss过滤
json
=
EscapeUtil
.
clean
(
json
).
trim
();
final
ByteArrayInputStream
bis
=
new
ByteArrayInputStream
(
json
.
getBytes
(
"utf-8"
));
byte
[]
jsonBytes
=
json
.
getBytes
(
"utf-8"
);
final
ByteArrayInputStream
bis
=
new
ByteArrayInputStream
(
jsonBytes
);
return
new
ServletInputStream
()
{
@Override
...
...
@@ -78,6 +79,11 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper
return
true
;
}
@Override
public
int
available
()
throws
IOException
{
return
jsonBytes
.
length
;
}
@Override
public
void
setReadListener
(
ReadListener
readListener
)
{
...
...
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