]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Further improve patterns
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 11 May 2020 16:03:00 +0000 (17:03 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 11 May 2020 16:03:00 +0000 (17:03 +0100)
lualib/lua_magic/patterns.lua

index f741900ce1bfd4be6cab25a8ec3dfda7f0ba7bcc..a19aba03cae167a03d437f2f69c75f7c0514b191 100644 (file)
@@ -26,13 +26,13 @@ local patterns = {
     -- These are alternatives
     matches = {
       {
-        string = [[^%PDF-\d]],
+        string = [[%PDF-[12]\.\d]],
         position = {'<=', 1024},
         weight = 60,
         heuristic = heuristics.pdf_format_heuristic
       },
       {
-        string = [[^%FDF-\d]],
+        string = [[%FDF-[12]\.\d]],
         position = {'<=', 1024},
         weight = 60,
         heuristic = heuristics.pdf_format_heuristic