mirror of
https://gitee.com/dromara/hutool.git
synced 2025-05-03 12:18:01 +08:00
issue #I4ZDQI 修改
This commit is contained in:
parent
6216a96ff8
commit
a294582d05
@ -144,7 +144,10 @@ public class ZipReader implements Closeable {
|
||||
read((zipEntry) -> {
|
||||
if (null == entryFilter || entryFilter.accept(zipEntry)) {
|
||||
//gitee issue #I4ZDQI
|
||||
String replace = StrUtil.replace(zipEntry.getName(), "*", "_");
|
||||
String replace = zipEntry.getName();
|
||||
if (System.getProperty("os.name").contains("Windows")) {
|
||||
replace = StrUtil.replace(zipEntry.getName(), "*", "_");
|
||||
}
|
||||
// FileUtil.file会检查slip漏洞,漏洞说明见http://blog.nsfocus.net/zip-slip-2/
|
||||
final File outItemFile = FileUtil.file(outFile, replace);
|
||||
if (zipEntry.isDirectory()) {
|
||||
|
Loading…
Reference in New Issue
Block a user