Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
19b86887
"ruoyi-ui/src/git@ustchcs.com:gujinli1118/RuoYi-Vue.git" did not exist on "965bdc9986ba66b10c2783b514b1cbdd19b29077"
Commit
19b86887
authored
Jun 09, 2020
by
Live
Committed by
Gitee
Jun 09, 2020
Browse files
IpUtils工具,清除Xss特殊字符,防止Xff注入攻击
parent
33f09d77
Changes
1
Show whitespace changes
Inline
Side-by-side
ruoyi/src/main/java/com/ruoyi/common/utils/ip/IpUtils.java
View file @
19b86887
...
@@ -40,7 +40,7 @@ public class IpUtils
...
@@ -40,7 +40,7 @@ public class IpUtils
{
{
ip
=
request
.
getRemoteAddr
();
ip
=
request
.
getRemoteAddr
();
}
}
ip
=
EscapeUtil
.
clean
(
ip
);
//清除Xss特殊字符
return
"0:0:0:0:0:0:0:1"
.
equals
(
ip
)
?
"127.0.0.1"
:
ip
;
return
"0:0:0:0:0:0:0:1"
.
equals
(
ip
)
?
"127.0.0.1"
:
ip
;
}
}
...
...
Write
Preview
Supports
Markdown
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