From c06502cd7668ff35bee3814b0dd93ccce83057db Mon Sep 17 00:00:00 2001 From: Bart Date: Wed, 11 Dec 2019 22:58:33 +0100 Subject: [PATCH] Improve RTF detection Certain RTF files may attempt to thwart detection by having a malformed RTF header, such as **{\rt000**. Removing 0x66 will result in detecting these malformed yet valid RTFs as well. Additional reading: https://www.decalage.info/rtf_tricks#Trick_1:_Incomplete_RTF_Header --- src/core/lib/FileSignatures.mjs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/lib/FileSignatures.mjs b/src/core/lib/FileSignatures.mjs index 17b17f23..5f5c0d2f 100644 --- a/src/core/lib/FileSignatures.mjs +++ b/src/core/lib/FileSignatures.mjs @@ -1008,8 +1008,7 @@ export const FILE_SIGNATURES = { 0: 0x7b, 1: 0x5c, 2: 0x72, - 3: 0x74, - 4: 0x66 + 3: 0x74 }, extractor: extractRTF },