You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Tilman Hausherr (Jira)" <ji...@apache.org> on 2024/02/20 15:47:00 UTC

[jira] [Commented] (TIKA-4201) Add hard limit to stream reading in IWorksParser#detectType

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

Tilman Hausherr commented on TIKA-4201:
---------------------------------------

Yeah, makes sense.

> Add hard limit to stream reading in IWorksParser#detectType
> -----------------------------------------------------------
>
>                 Key: TIKA-4201
>                 URL: https://issues.apache.org/jira/browse/TIKA-4201
>             Project: Tika
>          Issue Type: Bug
>            Reporter: Tim Allison
>            Priority: Minor
>
> TIKA-4199 showed us that we had been relying on hope that the detector would only read a limited number of bytes when detecting in IWorksParser#detectType. We should cache the first 1096 bytes, do the detection, and then reset the wrapped archive stream. 
> We should not rely on hope.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)