diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-09-20 09:48:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-20 09:48:29 +0100 |
commit | b8249b57dd86cb5e98c4f661bce0af605a3f9d29 (patch) | |
tree | 3990eef4fb0e23b01489e97119a1033f9b59bdaa | |
parent | 571ce4fc5e0daec78659605990d326ca0767b8a3 (diff) | |
parent | ca61c951dcdac1093b3b507dd42c94b5363ff701 (diff) | |
download | rspamd-b8249b57dd86cb5e98c4f661bce0af605a3f9d29.tar.gz rspamd-b8249b57dd86cb5e98c4f661bce0af605a3f9d29.zip |
Merge pull request #2506 from negram/selectors-fix
Selectors fix
-rw-r--r-- | lualib/lua_selectors.lua | 5 |
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) |