summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-09-20 09:48:29 +0100
committerGitHub <noreply@github.com>2018-09-20 09:48:29 +0100
commitb8249b57dd86cb5e98c4f661bce0af605a3f9d29 (patch)
tree3990eef4fb0e23b01489e97119a1033f9b59bdaa
parent571ce4fc5e0daec78659605990d326ca0767b8a3 (diff)
parentca61c951dcdac1093b3b507dd42c94b5363ff701 (diff)
downloadrspamd-b8249b57dd86cb5e98c4f661bce0af605a3f9d29.tar.gz
rspamd-b8249b57dd86cb5e98c4f661bce0af605a3f9d29.zip
Merge pull request #2506 from negram/selectors-fix
Selectors fix
-rw-r--r--lualib/lua_selectors.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/lualib/lua_selectors.lua b/lualib/lua_selectors.lua
index 8aab7e120..983f28589 100644
--- a/lualib/lua_selectors.lua
+++ b/lualib/lua_selectors.lua
@@ -244,7 +244,8 @@ e.g. `get_user`]],
-- the second argument is optional and defines the type (string by default)
['pool_var'] = {
['get_value'] = function(task, args)
- return task:get_mempool():get_variable(args[1], args[2]),(args[2] or 'string')
+ local type = args[2] or 'string'
+ return task:get_mempool():get_variable(args[1], type),(type)
end,
['description'] = [[Get specific pool var. The first argument must be variable name,
the second argument is optional and defines the type (string by default)]],
@@ -769,7 +770,7 @@ exports.parse_selector = function(cfg, str)
res.selector.args = selector_tbl[2] or E
lua_util.debugm(M, cfg, 'processed selector %s, args: %s',
- res.selector.name, res.selector.arg)
+ res.selector.name, res.selector.args)
-- Now process processors pipe
fun.each(function(proc_tbl)