]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix enormous scores for R_WHITE_ON_WHITE
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 28 Sep 2017 18:16:32 +0000 (19:16 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 28 Sep 2017 18:16:32 +0000 (19:16 +0100)
MFH: 1.6

rules/html.lua

index 81555839b78886d01a44ecebc13f19eb0a710e97..7cc0ccc91ae370bfb6b5e41bc50c16a13b3ab126 100644 (file)
@@ -220,6 +220,9 @@ rspamd_config.R_WHITE_ON_WHITE = {
 
     if ret then
       if transp_rate > 0.1 then
+        if transp_rate > 0.5 or transp_rate ~= transp_rate then
+          transp_rate = 0.5
+        end
         return true,(transp_rate * 2.0),arg
       end
     end
@@ -227,8 +230,9 @@ rspamd_config.R_WHITE_ON_WHITE = {
     return false
   end,
 
-  score = 6.0,
+  score = 4.0,
   group = 'html',
+  one_shot = true,
   description = 'Message contains low contrast text'
 }