mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-04 18:12:54 +01:00
fix: experimental fix to prevent path traversal with copied folders
This commit is contained in:
parent
5aa3cf9728
commit
47854ec757
@ -81,7 +81,8 @@ public class DirUtil {
|
||||
if (fileName.equals("res") && !in.containsFile(fileName)) {
|
||||
return;
|
||||
}
|
||||
File outFile = new File(out, fileName);
|
||||
String cleanedFilename = BrutIO.sanitizeUnknownFile(out, fileName);
|
||||
File outFile = new File(out, cleanedFilename);
|
||||
outFile.getParentFile().mkdirs();
|
||||
BrutIO.copyAndClose(in.getFileInput(fileName),
|
||||
new FileOutputStream(outFile));
|
||||
|
Loading…
Reference in New Issue
Block a user