summaryrefslogtreecommitdiffstats
path: root/lualib
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2018-02-27 15:00:29 +0200
committerAndrew Lewis <nerf@judo.za.org>2018-02-27 15:00:29 +0200
commit1e54b03ed676b1daf34c3a70263297d2f4f43529 (patch)
tree6533da7ea242391c5158f11f6dfbeca131263a95 /lualib
parenteb71392c46fd5830b102315e0cc544788e48f19c (diff)
downloadrspamd-1e54b03ed676b1daf34c3a70263297d2f4f43529.tar.gz
rspamd-1e54b03ed676b1daf34c3a70263297d2f4f43529.zip
[Fix] Deal with non-key arguments in lua_redis.exec_script
Diffstat (limited to 'lualib')
-rw-r--r--lualib/lua_redis.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/lualib/lua_redis.lua b/lualib/lua_redis.lua
index 2fb7c3781..a23ad781f 100644
--- a/lualib/lua_redis.lua
+++ b/lualib/lua_redis.lua
@@ -843,7 +843,7 @@ local function add_redis_script(script, redis_params)
end
exports.add_redis_script = add_redis_script
-local function exec_redis_script(id, params, callback, args)
+local function exec_redis_script(id, params, callback, args, aargs)
local args_modified = false
if not redis_scripts[id] then
@@ -881,6 +881,11 @@ local function exec_redis_script(id, params, callback, args)
if not args_modified then
table.insert(args, 1, tostring(#args))
table.insert(args, 1, script.sha)
+ if type(aargs) == 'table' then
+ for _, a in ipairs(aargs) do
+ table.insert(args, a)
+ end
+ end
args_modified = true
end