]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Oops, fix foldl call
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 11 Jan 2022 20:59:25 +0000 (20:59 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 11 Jan 2022 20:59:25 +0000 (20:59 +0000)
rules/misc.lua

index 9c8cade710c389b76403902ac21adc8e6bdaa4e8..93512cb9f66b8115e9c31e73902e377c9f03f16a 100644 (file)
@@ -339,7 +339,7 @@ rspamd_config.URI_COUNT_ODD = {
     local ct = task:get_header('Content-Type')
     if (ct and ct:lower():find('^multipart/alternative')) then
       local urls = task:get_urls_filtered(nil, {'subject', 'html_displayed', 'special'}) or {}
-      local nurls = fun.foldl(function(acc, val) return acc + val:get_count() end, 0)
+      local nurls = fun.foldl(function(acc, val) return acc + val:get_count() end, 0, urls)
 
       if nurls % 2 == 1 then
         return true, 1.0, tostring(nurls)