Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
cms_sys
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
西魏
cms_sys
Commits
a96f78d3
Commit
a96f78d3
authored
Jun 28, 2020
by
sgjj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sql注入问题
parent
b03b44a3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
MCmsAction.java
src/main/java/net/mingsoft/cms/action/web/MCmsAction.java
+13
-0
application.yml
src/main/resources/application.yml
+0
-1
No files found.
src/main/java/net/mingsoft/cms/action/web/MCmsAction.java
View file @
a96f78d3
...
@@ -107,6 +107,12 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
...
@@ -107,6 +107,12 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
@GetMapping
(
"/index.do"
)
@GetMapping
(
"/index.do"
)
public
void
index
(
HttpServletRequest
req
,
HttpServletResponse
resp
)
{
public
void
index
(
HttpServletRequest
req
,
HttpServletResponse
resp
)
{
Map
map
=
BasicUtil
.
assemblyRequestMap
();
Map
map
=
BasicUtil
.
assemblyRequestMap
();
map
.
forEach
((
k
,
v
)->{
//sql注入过滤
if
(
sqlFilter
(
v
.
toString
())){
map
.
put
(
k
,
""
);
}
});
map
.
put
(
ParserUtil
.
URL
,
BasicUtil
.
getUrl
());
map
.
put
(
ParserUtil
.
URL
,
BasicUtil
.
getUrl
());
//动态解析
//动态解析
map
.
put
(
ParserUtil
.
IS_DO
,
true
);
map
.
put
(
ParserUtil
.
IS_DO
,
true
);
...
@@ -203,12 +209,19 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
...
@@ -203,12 +209,19 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
if
(
sqlFilter
(
orderby
)){
if
(
sqlFilter
(
orderby
)){
orderby
=
"id"
;
orderby
=
"id"
;
}
}
PageBean
page
=
new
PageBean
();
PageBean
page
=
new
PageBean
();
//根据文章编号查询栏目详情模版
//根据文章编号查询栏目详情模版
CategoryEntity
column
=
(
CategoryEntity
)
categoryBiz
.
getEntity
(
Integer
.
parseInt
(
article
.
getContentCategoryId
()));
CategoryEntity
column
=
(
CategoryEntity
)
categoryBiz
.
getEntity
(
Integer
.
parseInt
(
article
.
getContentCategoryId
()));
//解析后的内容
//解析后的内容
String
content
=
""
;
String
content
=
""
;
Map
map
=
BasicUtil
.
assemblyRequestMap
();
Map
map
=
BasicUtil
.
assemblyRequestMap
();
map
.
forEach
((
k
,
v
)->{
//sql注入过滤
if
(
sqlFilter
(
v
.
toString
())){
map
.
put
(
k
,
""
);
}
});
//动态解析
//动态解析
map
.
put
(
ParserUtil
.
IS_DO
,
true
);
map
.
put
(
ParserUtil
.
IS_DO
,
true
);
//设置动态请求的模块路径
//设置动态请求的模块路径
...
...
src/main/resources/application.yml
View file @
a96f78d3
...
@@ -21,7 +21,6 @@ ms:
...
@@ -21,7 +21,6 @@ ms:
upload
:
upload
:
template
:
template
template
:
template
path
:
upload
#文件上传路径,可以根据实际写绝对路径
path
:
upload
#文件上传路径,可以根据实际写绝对路径
template
:
template
#文件上传路径,可以根据实际写绝对路径
mapping
:
/upload/**
#修改需要谨慎,系统第一次部署可以随意修改,如果已经有了上传数据,再次修改会导致之前上传的文件404
mapping
:
/upload/**
#修改需要谨慎,系统第一次部署可以随意修改,如果已经有了上传数据,再次修改会导致之前上传的文件404
denied
:
.exe,.jsp
denied
:
.exe,.jsp
multipart
:
multipart
:
...
...
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