commit fbaa06d: [Fix] Fix passing of methods arguments
Vsevolod Stakhov
vsevolod at highsecure.ru
Thu May 14 12:21:21 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-05-14 12:43:32 +0100
URL: https://github.com/rspamd/rspamd/commit/fbaa06d71d3421aad83a61c74fb45b9ee996b883
[Fix] Fix passing of methods arguments
---
lualib/lua_selectors/init.lua | 4 ++--
1 file 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
More information about the Commits
mailing list