From: Vsevolod Stakhov Date: Sun, 20 Mar 2022 22:53:27 +0000 (+0000) Subject: [Minor] Multimap: Fix default score X-Git-Tag: 3.2~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9bf414e6a155038defc976bb44fcfeaa0e9aeffc;p=thirdparty%2Frspamd.git [Minor] Multimap: Fix default score Issue: #4117 --- diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua index b03b4a6c16..269e655386 100644 --- a/src/plugins/lua/multimap.lua +++ b/src/plugins/lua/multimap.lua @@ -1272,7 +1272,7 @@ if opts and type(opts) == 'table' then type = 'virtual', name = s, parent = id, - score = 0, -- Default score + score = tonumber(rule.score or "0") or 0, -- Default score }) rule['symbols_set'][s] = 1 end, rule['symbols']) @@ -1310,7 +1310,7 @@ if opts and type(opts) == 'table' then rspamd_config:register_symbol({ type = 'prefilter', name = rule['symbol'], - score = rule.score or 0, + score = tonumber(rule.score or "0") or 0, callback = gen_multimap_callback(rule), }) end, fun.filter(function(r) return r['prefilter'] end, rules))