fix: improve logging messages for zip security errors (#750)(PR #1698)

Logging error messages on invalid file-names or path traversal attacks improved
This commit is contained in:
Jan S
2022-10-06 20:31:42 +02:00
committed by GitHub
parent 711419a797
commit 8a45602ae6
2 changed files with 3 additions and 3 deletions
@@ -53,10 +53,10 @@ public class ZipSecurity {
if (isInSubDirectoryInternal(currentPath, canonical)) {
return true;
}
LOG.error("Path traversal attack detected, invalid name: {}", entryName);
LOG.error("Invalid file name or path traversal attack detected: {}", entryName);
return false;
} catch (Exception e) {
LOG.error("Path traversal attack detected, invalid name: {}", entryName);
LOG.error("Invalid file name or path traversal attack detected: {}", entryName);
return false;
}
}