Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jeecg-boot
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
jeecg-boot
Commits
37fe6fea
Commit
37fe6fea
authored
Jun 25, 2021
by
zhangdaiscott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
表字典接口存在SQL注入漏洞,增加签名拦截器 自定义组件验签失败 issues/I3XNK1
parent
3fbb5ee4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/sign/util/HttpUtils.java
+10
-2
No files found.
jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/sign/util/HttpUtils.java
View file @
37fe6fea
package
org
.
jeecg
.
config
.
sign
.
util
;
import
com.alibaba.fastjson.JSONObject
;
import
lombok.extern.slf4j.Slf4j
;
import
org.jeecg.common.util.oConvertUtils
;
import
org.springframework.http.HttpMethod
;
...
...
@@ -21,6 +22,7 @@ import java.util.TreeMap;
* @author jeecg
* @date 20210621
*/
@Slf4j
public
class
HttpUtils
{
/**
...
...
@@ -36,7 +38,10 @@ public class HttpUtils {
// 获取URL上最后带逗号的参数变量 sys/dict/getDictItems/sys_user,realname,username
String
pathVariable
=
request
.
getRequestURI
().
substring
(
request
.
getRequestURI
().
lastIndexOf
(
"/"
)
+
1
);
if
(
pathVariable
.
contains
(
","
))
{
result
.
put
(
SignUtil
.
xPathVariable
,
pathVariable
);
log
.
info
(
" pathVariable: {}"
,
pathVariable
);
String
deString
=
URLDecoder
.
decode
(
pathVariable
,
"UTF-8"
);
log
.
info
(
" pathVariable decode: {}"
,
deString
);
result
.
put
(
SignUtil
.
xPathVariable
,
deString
);
}
// 获取URL上的参数
Map
<
String
,
String
>
urlParams
=
getUrlParams
(
request
);
...
...
@@ -71,7 +76,10 @@ public class HttpUtils {
// 获取URL上最后带逗号的参数变量 sys/dict/getDictItems/sys_user,realname,username
String
pathVariable
=
url
.
substring
(
url
.
lastIndexOf
(
"/"
)
+
1
);
if
(
pathVariable
.
contains
(
","
))
{
result
.
put
(
SignUtil
.
xPathVariable
,
pathVariable
);
log
.
info
(
" pathVariable: {}"
,
pathVariable
);
String
deString
=
URLDecoder
.
decode
(
pathVariable
,
"UTF-8"
);
log
.
info
(
" pathVariable decode: {}"
,
deString
);
result
.
put
(
SignUtil
.
xPathVariable
,
deString
);
}
// 获取URL上的参数
Map
<
String
,
String
>
urlParams
=
getUrlParams
(
queryString
);
...
...
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