Skip to content

Commit

Permalink
TIKA-4257 -- lower dbf priority (#1773)
Browse files Browse the repository at this point in the history
  • Loading branch information
tballison authored May 20, 2024
1 parent 7a03331 commit 0190411
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@
<glob pattern="*.davmount"/>
</mime-type>
<mime-type type="application/x-dbf">
<magic priority="100">
<!-- this looks unique/precise. It isn't. False positives are common. Keep priority low. -->
<magic priority="40">
<match value="(?s)^[\\x02\\x03\\x30\\x31\\x32\\x43\\x63\\x83\\x8B\\xCB\\xF5\\xE5\\xFB].[\\x01-\\x0C][\\x01-\\x1F].{4}(?:.[^\\x00]|[\\x41-\\xFF].)(?:[^\\x00\\x01].|.[^\\x00]).{31}(?&lt;=[\\x00][^\\x00]{0,10})[A-Z@+]" type="regex" offset="0"/>
</magic>
<glob pattern="*.dbf"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public void testTSDFileData() throws Exception {
@Test
public void testTSDFileDataRecursiveMetadataXML() throws Exception {
List<Metadata> list = getRecursiveMetadata("MANIFEST.XML.TSD");
assertEquals(2, list.size());
assertEquals(3, list.size());
assertContains(TSDParser.class.getName(),
Arrays.asList(list.get(0).getValues(TikaCoreProperties.TIKA_PARSED_BY)));
}
Expand Down

0 comments on commit 0190411

Please sign in to comment.