Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
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
station
YeeAmosFireAutoSysRoot
Commits
6d26e415
Commit
6d26e415
authored
Mar 25, 2024
by
李秀明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 路径操作资源保护
Links
https://docs.qq.com/sheet/DTkRSaWhSZXBlaldN?tab=000008&_t=1711087563249
(No.15)
parent
7e23a914
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
FileUtils.java
...in/java/com/yeejoin/amos/fas/business/util/FileUtils.java
+6
-1
WordToHtmlConverter.java
...va/org/apache/poi/hwpf/converter/WordToHtmlConverter.java
+0
-0
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/util/FileUtils.java
View file @
6d26e415
package
com
.
yeejoin
.
amos
.
fas
.
business
.
util
;
import
org.apache.commons.io.FilenameUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
...
...
@@ -79,6 +80,10 @@ public class FileUtils {
* @return
*/
public
static
String
fileToZip
(
List
<
String
>
list
,
String
fileName
,
String
ipUrl
)
{
if
(
StringUtils
.
isBlank
(
fileName
))
{
throw
new
RuntimeException
(
"文件名不能为空"
);
}
fileName
=
FilenameUtils
.
normalize
(
fileName
);
InputStream
fis
=
null
;
BufferedInputStream
bis
=
null
;
FileOutputStream
fos
=
null
;
...
...
@@ -91,7 +96,7 @@ public class FileUtils {
}
else
if
(
StringUtils
.
isBlank
(
tmpdir
)){
tmpdir
=
""
;
}
String
path
=
tmpdir
+
fileName
;
String
path
=
FilenameUtils
.
normalize
(
tmpdir
+
fileName
)
;
try
{
File
zipFile
=
new
File
(
path
);
zipFile
.
deleteOnExit
();
...
...
YeeAmosFireAutoSysService/src/main/java/org/apache/poi/hwpf/converter/WordToHtmlConverter.java
deleted
100644 → 0
View file @
7e23a914
This diff is collapsed.
Click to expand it.
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