소스 검색

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
Bart 5 년 전
부모
커밋
c06502cd76
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      src/core/lib/FileSignatures.mjs

+ 1 - 2
src/core/lib/FileSignatures.mjs

@@ -1008,8 +1008,7 @@ export const FILE_SIGNATURES = {
                 0: 0x7b,
                 0: 0x7b,
                 1: 0x5c,
                 1: 0x5c,
                 2: 0x72,
                 2: 0x72,
-                3: 0x74,
-                4: 0x66
+                3: 0x74
             },
             },
             extractor: extractRTF
             extractor: extractRTF
         },
         },