[ https://issues.apache.org/jira/browse/TIKA-2675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16518281#comment-16518281 ]
ASF GitHub Bot commented on TIKA-2675: -------------------------------------- sebastian-nagel opened a new pull request #240: TIKA-2675 OpenDocumentParser should fail on invalid zip files URL: https://github.com/apache/tika/pull/240 - throw IOException if ZipInputStream is invalid or does not contain any entries Note: now the behavior on empty zip files is different, if called on a local file (succeeds, empty document) or not (fails). The OpenDocument format spec ([section 17.2](http://docs.oasis-open.org/office/v1.1/OS/OpenDocument-v1.1.pdf), cf. [wikipedia article](https://en.wikipedia.org/wiki/OpenDocument_technical_specification#Format_internals)) does not state anything about empty zip files. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > OpenDocumentParser should fail on invalid zip files > --------------------------------------------------- > > Key: TIKA-2675 > URL: https://issues.apache.org/jira/browse/TIKA-2675 > Project: Tika > Issue Type: Bug > Components: parser > Reporter: Sebastian Nagel > Priority: Major > > The OpenDocumentParser assumes a zip file as container. However, if it is > called on an invalid zip stream from a remote URL (see NUTCH-2603), the > parser signals success and returns a document with no/empty content. The > behavior is different when called on a local file: while the [constructor of > ZipFile|https://docs.oracle.com/javase/8/docs/api/java/util/zip/ZipFile.html#ZipFile-java.io.File-] > fails on invalid input, the [constructor of > ZipInputStream|https://docs.oracle.com/javase/8/docs/api/java/util/zip/ZipInputStream.html#ZipInputStream-java.io.InputStream-] > silently ignores the input. -- This message was sent by Atlassian JIRA (v7.6.3#76005)