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 2020/06/02 13:52:47 UTC

[tika] 05/12: Make the bplist magic more specific where possible, keep version catch-all as now otherwise

This is an automated email from the ASF dual-hosted git repository.

tallison pushed a commit to branch branch_1x
in repository https://gitbox.apache.org/repos/asf/tika.git

commit 5b852f1c5091f37ec5549790e512ee4b1d7a1280
Author: Nick Burch <ni...@gagravarr.org>
AuthorDate: Thu May 28 07:05:30 2020 +0100

    Make the bplist magic more specific where possible, keep version catch-all as now otherwise
---
 .../main/resources/org/apache/tika/mime/tika-mimetypes.xml    | 11 +++++++++++
 1 file changed, 11 insertions(+)

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 1343bc0..88604a0 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
@@ -3206,6 +3206,17 @@
   </mime-type>
 
   <mime-type type="application/x-bplist">
+    <!-- Check for well-known bplist versions -->
+    <magic priority="70">
+      <match value="bplist\000\000" type="string" offset="0"/>
+      <match value="bplist\000\001" type="string" offset="0"/>
+      <match value="bplist\100\000" type="string" offset="0"/>
+      <match value="bplist00" type="string" offset="0"/>
+      <match value="bplist01" type="string" offset="0"/>
+      <match value="bplist10" type="string" offset="0"/>
+      <match value="bplist15" type="string" offset="0"/>
+      <match value="bplist16" type="string" offset="0"/>
+    </magic>
     <!-- The priority is 60, as .webarchive files often contain
          (X)HTML content. The bplist magic must trump the XHTML
          magics further within the file. This must also be