You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ni...@apache.org on 2020/05/28 06:13:22 UTC

[tika] 01/02: 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.

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

commit e9d62d24c19250053aee07a59c9e4de5197f2f42
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 7210066..aad1c39 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
@@ -3295,6 +3295,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