aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/lua_settings.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-08-14 18:03:31 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-08-14 18:03:31 +0100
commit865677cea663bd117b5ee66313bc64a78b4a12e5 (patch)
tree0bebcd882cf6c1d64edf8184d38a0715a499ca62 /lualib/lua_settings.lua
parentf8313b3fe5b254439617e2c2131e1e4117848fce (diff)
downloadrspamd-865677cea663bd117b5ee66313bc64a78b4a12e5.tar.gz
rspamd-865677cea663bd117b5ee66313bc64a78b4a12e5.zip
[Minor] Fix another case
Diffstat (limited to 'lualib/lua_settings.lua')
-rw-r--r--lualib/lua_settings.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/lualib/lua_settings.lua b/lualib/lua_settings.lua
index d03e63e7d..cd8afe3ed 100644
--- a/lualib/lua_settings.lua
+++ b/lualib/lua_settings.lua
@@ -203,10 +203,18 @@ local function transform_settings_maybe(settings, name)
if apply.symbols then
-- Check if added symbols are enabled
- for _,s in pairs(apply.symbols) do
+ for k,v in pairs(apply.symbols) do
+ local s
+ -- Check if we have ["sym1", "sym2" ...] or {"sym1": xx, "sym2": yy}
+ if type(k) == 'string' then
+ s = k
+ else
+ s = v
+ end
if not symhash[s] then
lua_util.debugm('settings', rspamd_config,
'added symbol %s to symbols_enabled for %s', s, name)
+ apply.symbols_enabled[#apply.symbols_enabled + 1] = s
end
end
end