Bumping versions

This commit is contained in:
buildmaster
2022-08-17 14:30:08 +00:00
parent 11c357718f
commit 4d7b4bf13f

View File

@@ -68,13 +68,13 @@ public final class ZipCategory {
if (!entry.isDirectory()) {
final File destinationFile = new File(destination, entry.getName());
/*
* If we see the relative traversal string of ".." we need to make sure
* that the outputdir + name doesn't leave the outputdir.
* If we see the relative traversal string of ".." we need to make
* sure that the outputdir + name doesn't leave the outputdir.
*/
String zipEntryName = entry.getName();
if (!destinationFile.toPath().normalize().startsWith(destination.toPath())) {
throw new ZipException("The file " + zipEntryName +
" is trying to leave the target output directory of " + destination);
throw new ZipException("The file " + zipEntryName
+ " is trying to leave the target output directory of " + destination);
}
if (destinationFile.getParentFile() != null) {
destinationFile.getParentFile().mkdirs();