You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ta...@apache.org on 2024/03/21 15:40:29 UTC
(tika) branch branch_2x updated: TIKA-4217 -- require new line or white space as part of bitmap magic (#1674)
This is an automated email from the ASF dual-hosted git repository.
tallison pushed a commit to branch branch_2x
in repository https://gitbox.apache.org/repos/asf/tika.git
The following commit(s) were added to refs/heads/branch_2x by this push:
new 61e55b7f1 TIKA-4217 -- require new line or white space as part of bitmap magic (#1674)
61e55b7f1 is described below
commit 61e55b7f1d48687a5d4329cc5c9cf360b19bfb58
Author: Tim Allison <ta...@apache.org>
AuthorDate: Thu Mar 21 11:33:31 2024 -0400
TIKA-4217 -- require new line or white space as part of bitmap magic (#1674)
(cherry picked from commit 08727d5224f7c663a19c572154939a2c140a6773)
---
.../org/apache/tika/mime/tika-mimetypes.xml | 53 ++++++++++++++++++----
1 file changed, 44 insertions(+), 9 deletions(-)
diff --git a/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml b/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml
index 7a6d660e5..ca2dcaa6f 100644
--- a/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml
+++ b/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml
@@ -6596,8 +6596,16 @@
<acronym>PBM</acronym>
<_comment>Portable Bit Map</_comment>
<magic priority="50">
- <match value="P1" type="string" offset="0"/>
- <match value="P4" type="string" offset="0"/>
+ <match value="P1" type="string" offset="0">
+ <match value="\x0a" type="string" offset="2"/>
+ <match value="\x0d" type="string" offset="2"/>
+ <match value="\x20" type="string" offset="2"/>
+ </match>
+ <match value="P4" type="regex" offset="0">
+ <match value="\x0a" type="string" offset="2"/>
+ <match value="\x0d" type="string" offset="2"/>
+ <match value="\x20" type="string" offset="2"/>
+ </match>
</magic>
<glob pattern="*.pbm"/>
</mime-type>
@@ -6607,9 +6615,16 @@
<acronym>PGM</acronym>
<_comment>Portable Graymap Graphic</_comment>
<magic priority="50">
- <match value="P2" type="string" offset="0"/>
- <match value="P5" type="string" offset="0"/>
- <match offset="0" type="string" value="\x50\x35\x0a"/>
+ <match value="P2" type="string" offset="0">
+ <match value="\x0a" type="string" offset="2"/>
+ <match value="\x0d" type="string" offset="2"/>
+ <match value="\x20" type="string" offset="2"/>
+ </match>
+ <match value="P5" type="regex" offset="0">
+ <match value="\x0a" type="string" offset="2"/>
+ <match value="\x0d" type="string" offset="2"/>
+ <match value="\x20" type="string" offset="2"/>
+ </match>
</magic>
<glob pattern="*.pgm"/>
</mime-type>
@@ -6619,13 +6634,33 @@
<acronym>PXM</acronym>
<_comment>UNIX Portable Bitmap Graphic</_comment>
<magic priority="50">
- <match value="P3" type="string" offset="0"/>
- <match value="P6" type="string" offset="0"/>
- <match value="P7" type="string" offset="0"/>
- <match offset="0" type="string" value="\x50\x34\x0a"/>
+ <match value="P3" type="string" offset="0">
+ <match value="\x0a" type="string" offset="2"/>
+ <match value="\x0d" type="string" offset="2"/>
+ <match value="\x20" type="string" offset="2"/>
+ </match>
+ <match value="P6" type="regex" offset="0">
+ <match value="\x0a" type="string" offset="2"/>
+ <match value="\x0d" type="string" offset="2"/>
+ <match value="\x20" type="string" offset="2"/>
+ </match>
</magic>
<glob pattern="*.ppm"/>
</mime-type>
+ <mime-type type="image/x-portable-arbitrarymap">
+ <sub-class-of type="image/x-portable-anymap"/>
+ <acronym>PAM</acronym>
+ <_comment>UNIX Portable Bitmap Graphic Arbitrary Map</_comment>
+ <magic priority="50">
+ <match value="P7" type="string" offset="0">
+ <match value="\x0a" type="string" offset="2"/>
+ <match value="\x0d" type="string" offset="2"/>
+ <match value="\x20" type="string" offset="2"/>
+ </match>
+ </magic>
+ <glob pattern="*.pam"/>
+ </mime-type>
+
<mime-type type="image/x-raw-adobe">
<acronym>DNG</acronym>