]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix PDF_JAVASCRIPT rule
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 21 Jan 2020 09:27:13 +0000 (09:27 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 21 Jan 2020 09:27:32 +0000 (09:27 +0000)
rules/content.lua

index 718fd22c11814fac739ca17aec9001020dc68428..fb7a0ad583179bcabb65caec02c2faee872f3f8f 100644 (file)
@@ -24,12 +24,9 @@ local function process_pdf_specific(task, part, specific)
     end
   end
 
-  if specific.javascript then
+  if specific.openaction and #specific.openaction > 10 then
     task:insert_result('PDF_JAVASCRIPT', 1.0, part:get_filename())
-    suspicious_factor = suspicious_factor + 0.1
-    if specific.openaction then
-      suspicious_factor = suspicious_factor + 0.5
-    end
+    suspicious_factor = suspicious_factor + 0.5
   end
 
   if specific.suspicious then