summaryrefslogtreecommitdiffstats
path: root/rules
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-06-06 13:53:56 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-06-06 13:53:56 +0100
commitacd5eaa40cd437feaf9053cb93b657339a90be2e (patch)
treef8156640ffc19b1ac6894f064babbbb16f17db0e /rules
parent4f42cf904b7410714a3c12855619aea9749346b2 (diff)
downloadrspamd-acd5eaa40cd437feaf9053cb93b657339a90be2e.tar.gz
rspamd-acd5eaa40cd437feaf9053cb93b657339a90be2e.zip
[Rules] Improve URL_COUNT_ODD rule
Diffstat (limited to 'rules')
-rw-r--r--rules/misc.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/rules/misc.lua b/rules/misc.lua
index 2a4b5c107..35942e3e1 100644
--- a/rules/misc.lua
+++ b/rules/misc.lua
@@ -288,7 +288,7 @@ rspamd_config.URI_COUNT_ODD = {
local urls = task:get_urls() or {}
local nurls = fun.filter(function(url)
return not url:is_html_displayed()
- end, urls):foldl(function(acc, val) return acc + 1 end, 0)
+ end, urls):foldl(function(acc, val) return acc + val:get_count() end, 0)
if nurls % 2 == 1 then
return true, 1.0, tostring(nurls)