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

[jira] [Created] (TIKA-4217) Require newline in image/x-portable-graymap and image/x-portable-bitmap magic

Tim Allison created TIKA-4217:
---------------------------------

             Summary: Require newline in image/x-portable-graymap and image/x-portable-bitmap magic
                 Key: TIKA-4217
                 URL: https://issues.apache.org/jira/browse/TIKA-4217
             Project: Tika
          Issue Type: Improvement
            Reporter: Tim Allison


On the user list, Kashif Khan noted that some text files were being mis-identified as portable image files because our magic is only checking for the first two characters for some of our patterns. However, for others, we're requiring a newline character at the end.

I _think_ (based on https://github.com/Traperto/magic-bytes-validator) and our existing patterns that we can make our mime patterns a bit stricter by requiring the \n after all the patterns.



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