summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2022-03-20 22:53:27 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2022-03-20 22:53:27 +0000
commit9bf414e6a155038defc976bb44fcfeaa0e9aeffc (patch)
treee5a8569accab4cfb44b0cb4f55c6496f9ecadb91 /src
parent8cf694d95480986570ef09057707c6a52cd5fa90 (diff)
downloadrspamd-9bf414e6a155038defc976bb44fcfeaa0e9aeffc.tar.gz
rspamd-9bf414e6a155038defc976bb44fcfeaa0e9aeffc.zip
[Minor] Multimap: Fix default score
Issue: #4117
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/multimap.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua
index b03b4a6c1..269e65538 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))