mirror da
https://github.com/rspamd/rspamd.git
synced 2024-07-29 20:17:47 +02:00
[Fix] Deal with non-key arguments in lua_redis.exec_script
This commit is contained in:
parent
eb71392c46
commit
1e54b03ed6
@ -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
|
||||
|
||||
|
@ -542,7 +542,7 @@ local function dmarc_callback(task)
|
||||
|
||||
if report_data then
|
||||
rspamd_redis.exec_redis_script(take_report_id, {task = task, is_write = true}, dmarc_report_cb,
|
||||
{2, idx_key, dmarc_domain_key, hfromdom, report_data})
|
||||
{idx_key, dmarc_domain_key}, {hfromdom, report_data})
|
||||
end
|
||||
end
|
||||
|
||||
|
Caricamento…
Fai riferimento in un nuovo problema
Block a user