Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Commit

Permalink
fix: zipper down 路径穿越问题
Browse files Browse the repository at this point in the history
  • Loading branch information
caiyuwei committed Jul 21, 2020
1 parent 2866dc0 commit 2bc4380
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions library/src/main/java/com/opensource/svgaplayer/SVGAParser.kt
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,10 @@ class SVGAParser(context: Context?) {
ZipInputStream(it).use { zipInputStream ->
while (true) {
val zipItem = zipInputStream.nextEntry ?: break
if (zipItem.name.contains("../")) {
// 解压路径存在路径穿越问题,直接过滤
continue
}
if (zipItem.name.contains("/")) {
continue
}
Expand Down

0 comments on commit 2bc4380

Please sign in to comment.