使用Zip4j库在播放控制台中发出警告错误,如何解决?

问题描述 投票:1回答:1

我使用zip4j库将文件解压缩到内部应用程序文件夹(即getApplicationInfo().dataDir + "/databases"),并且该应用程序已发布在Play商店中,控制台发出警告“修复Zip路径遍历漏洞Android“

https://support.google.com/faqs/answer/9294009

如何解决此问题或任何其他用于解压缩受密码保护的zip文件的库。谢谢

这里是用于提取受密码保护的zip文件的代码。

   try {
            net.lingala.zip4j.core.ZipFile zipFile = new net.lingala.zip4j.core.ZipFile(zipFilePath);
            if (zipFile.isEncrypted())
                zipFile.setPassword(pass.toCharArray());
            File des = new File(unzipAtLocation);
            boolean isCreated = true;
            if (!des.exists())
                isCreated = des.mkdirs();
            if (isCreated)
                zipFile.extractAll(unzipAtLocation);
        } catch (Exception e) {
            Log.e("Unzip zip", "Unzip exception", e);
        }
android unzip google-play-console
1个回答
0
投票

此问题已在Zip4j的版本2.3.1中修复。

© www.soinside.com 2019 - 2024. All rights reserved.