commit 9bf414e: [Minor] Multimap: Fix default score
Vsevolod Stakhov
vsevolod at highsecure.ru
Sun Mar 20 22:56:04 UTC 2022
Author: Vsevolod Stakhov
Date: 2022-03-20 22:53:27 +0000
URL: https://github.com/rspamd/rspamd/commit/9bf414e6a155038defc976bb44fcfeaa0e9aeffc (HEAD -> master)
[Minor] Multimap: Fix default score
Issue: #4117
---
src/plugins/lua/multimap.lua | 4 ++--
1 file 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))
More information about the Commits
mailing list