This is an automated email from the ASF dual-hosted git repository. peterlee pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-compress.git
The following commit(s) were added to refs/heads/master by this push: new 81299d2 add more information about allowStoredEntriesWithDataDescriptor 81299d2 is described below commit 81299d245660a7b931a445744aaf451783426f3e Author: PeterAlfredLee <peteralfred...@gmail.com> AuthorDate: Sat Dec 26 16:38:51 2020 +0800 add more information about allowStoredEntriesWithDataDescriptor --- .../compress/archivers/zip/ZipArchiveInputStream.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java index 787caa7..6774f25 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java @@ -114,7 +114,17 @@ public class ZipArchiveInputStream extends ArchiveInputStream implements InputSt */ private ByteArrayInputStream lastStoredEntry = null; - /** Whether the stream will try to read STORED entries that use a data descriptor. */ + /** + * Whether the stream will try to read STORED entries that use a data descriptor. + * Setting it to true means we will not stop reading a entry with the compressed + * size, instead we will stoping reading a entry when a data descriptor is met(by + * finding the Data Descriptor Signature). This will completely break down in some + * cases - like JARs in WARs. + * <p> + * See also : + * https://issues.apache.org/jira/projects/COMPRESS/issues/COMPRESS-555 + * https://github.com/apache/commons-compress/pull/137#issuecomment-690835644 + */ private boolean allowStoredEntriesWithDataDescriptor = false; /** Count decompressed bytes for current entry */