Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gdtel-gztel-school-center
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
吴学德
gdtel-gztel-school-center
Commits
480fbe41
Commit
480fbe41
authored
Oct 19, 2020
by
黎配弘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
尝试修复路径遍历的问题
parent
e7592b9a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
service-manager/src/main/java/com/winsun/controller/PackageController.java
+5
-5
No files found.
service-manager/src/main/java/com/winsun/controller/PackageController.java
View file @
480fbe41
...
...
@@ -185,18 +185,18 @@ public class PackageController extends BaseController {
@Permission
(
menuname
=
"上传背景图"
,
value
=
"backgroundUpload"
,
method
=
RequestMethod
.
POST
)
public
ResponseData
<
String
>
backgroundUpload
(
@RequestParam
(
value
=
"file"
)
MultipartFile
file
,
@RequestParam
(
value
=
"id"
,
required
=
false
)
String
id
)
{
public
ResponseData
<
String
>
backgroundUpload
(
@RequestParam
(
value
=
"file"
)
MultipartFile
file
,
@RequestParam
(
value
=
"id"
,
required
=
false
)
int
id
)
{
String
subfix
=
""
;
String
backgroundpath
=
FilePath
.
BACKGROUNDIMG
.
getValue
()
+
"/"
+
DEFAULTPATH
+
"/"
;
if
(
StringUtils
.
isBlank
(
id
)
)
{
if
(
id
<
1
)
{
EntityWrapper
<
Package
>
packagewrapper
=
new
EntityWrapper
<>();
packagewrapper
.
setSqlSelect
(
"max(id) as id"
);
List
<
Map
<
String
,
Object
>>
selectMaps
=
packageMapper
.
selectMaps
(
packagewrapper
);
id
=
selectMaps
.
get
(
0
).
get
(
"id"
).
toString
(
);
Integer
fileid
=
Integer
.
valueOf
(
id
)
+
1
;
id
=
Integer
.
parseInt
(
selectMaps
.
get
(
0
).
get
(
"id"
).
toString
()
);
Integer
fileid
=
id
+
1
;
subfix
=
fileid
.
toString
();
}
else
{
subfix
=
id
;
subfix
=
String
.
valueOf
(
id
)
;
}
backgroundpath
=
backgroundpath
+
subfix
.
replace
(
"."
,
""
).
replace
(
"/"
,
""
).
replace
(
"\\"
,
""
);
...
...
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