diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-05-14 12:43:32 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-05-14 12:43:32 +0100 |
commit | fbaa06d71d3421aad83a61c74fb45b9ee996b883 (patch) | |
tree | 03f3d1a8bdef4fcf3f6f0a9584fc05202234ac43 /lualib | |
parent | ba22ea79c6eaffa684c7122162612c0429f756a5 (diff) | |
download | rspamd-fbaa06d71d3421aad83a61c74fb45b9ee996b883.tar.gz rspamd-fbaa06d71d3421aad83a61c74fb45b9ee996b883.zip |
[Fix] Fix passing of methods arguments
Diffstat (limited to 'lualib')
-rw-r--r-- | lualib/lua_selectors/init.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lualib/lua_selectors/init.lua b/lualib/lua_selectors/init.lua index ba20810c5..8de79f767 100644 --- a/lualib/lua_selectors/init.lua +++ b/lualib/lua_selectors/init.lua @@ -102,7 +102,7 @@ local function process_selector(task, sel) if meth.types[etype] then lua_util.debugm(M, task, 'apply method `%s` to %s', meth.name, etype) - input,etype = meth.process(input, etype) + input,etype = meth.process(input, etype, meth.args) else local pt = pure_type(etype) @@ -342,7 +342,7 @@ exports.parse_selector = function(cfg, str) return inp[method_name],'string' else -- We call method unpacking arguments and dropping all but the first result returned - local ret = (inp[method_name](inp, unpack_function(args))) + local ret = (inp[method_name](inp, unpack_function(args or E))) local ret_type = type(ret) -- Now apply types heuristic if ret_type == 'string' then |