summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-08-28 09:39:08 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-08-28 09:39:08 +0100
commit10d6ca42e32ce16d25a5c00f30d46cae85853b9f (patch)
treeebfc35d8c6ec9fd8b3ea1bc07bc4f1b991d674fe
parent201a49582d05bac785750b46adbf1e2309e87b78 (diff)
downloadrspamd-10d6ca42e32ce16d25a5c00f30d46cae85853b9f.tar.gz
rspamd-10d6ca42e32ce16d25a5c00f30d46cae85853b9f.zip
[Minor] Rbl: Fix symbols options checks
-rw-r--r--src/plugins/lua/rbl.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua
index 3b612be40..30945d49f 100644
--- a/src/plugins/lua/rbl.lua
+++ b/src/plugins/lua/rbl.lua
@@ -982,11 +982,13 @@ local function rbl_callback_white(task)
local whitelisted_elements = {}
for _, w in ipairs(white_symbols) do
local ws = task:get_symbol(w)
- if ws then
- lua_util.debugm(N, task,'found whitelist %s', w)
+ if ws and ws[1] then
+ ws = ws[1]
if not ws.options then ws.options = {} end
for _,opt in ipairs(ws.options) do
local elt,what = opt:match('^([^:]+):([^:]+)')
+ lua_util.debugm(N, task,'found whitelist from %s: %s(%s)', w,
+ elt, what)
if elt and what then
whitelisted_elements[elt] = what
end