tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nick Burch (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TIKA-645) Parsers can't get at an underlying TikaInputStream to get the file if they wanted one
Date Thu, 19 May 2011 12:12:47 GMT

    [ https://issues.apache.org/jira/browse/TIKA-645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13036137#comment-13036137
] 

Nick Burch commented on TIKA-645:
---------------------------------

I've just gone to test this with a 5mb excel file. With 0.9, anything smaller than "-Xms21m
-Xmx21m" gives an out of memory

With the latest trunk, something else breaks though:

java -Xms21m -Xmx21m -jar ~/java/apache-tika/tika-app/target/tika-app-1.0-SNAPSHOT.jar --metadata
ex45698-22488.xls
Exception in thread "main" org.apache.tika.exception.TikaException: Zip bomb detected!
	at org.apache.tika.sax.SecureContentHandler.throwIfCauseOf(SecureContentHandler.java:128)
	at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:132)
	at org.apache.tika.cli.TikaCLI$OutputType.process(TikaCLI.java:126)
	at org.apache.tika.cli.TikaCLI.process(TikaCLI.java:340)
	at org.apache.tika.cli.TikaCLI.main(TikaCLI.java:97)
Caused by: org.apache.tika.sax.SecureContentHandler$SecureSAXException: Suspected zip bomb:
0 input bytes produced 1000020 output characters
	at org.apache.tika.sax.SecureContentHandler.advance(SecureContentHandler.java:144)

Looks like something else needs to be updated too?

> Parsers can't get at an underlying TikaInputStream to get the file if they wanted one
> -------------------------------------------------------------------------------------
>
>                 Key: TIKA-645
>                 URL: https://issues.apache.org/jira/browse/TIKA-645
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 0.9
>            Reporter: Nick Burch
>            Assignee: Jukka Zitting
>             Fix For: 1.0
>
>
> Spotted this with the office parser, but it should be general. The user creates a TikaInputStream,
and passes that off to the parser framework. The Parser that is called may wish to spot that
the input is a File backed TikaInputStream, and take a shortcut to use the file instead of
the InputStream.
> However, what the parser gets is a TaggedInputStream wrapping a CountingInputStream wrapping
the original TikaInputStream. As such, it can't get at the file.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message