aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/lua_mime.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-03-01 10:34:07 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-03-01 10:34:07 +0000
commitb14e9419ca91f289fa717ce27da99819197ee57f (patch)
tree962af802f1b9d95c7146f731aee2bc3a0890b186 /lualib/lua_mime.lua
parent0a82f42bc508f90d9f23a6a2e087495c04b1a2a5 (diff)
downloadrspamd-b14e9419ca91f289fa717ce27da99819197ee57f.tar.gz
rspamd-b14e9419ca91f289fa717ce27da99819197ee57f.zip
[Minor] Fix issues with values check
Diffstat (limited to 'lualib/lua_mime.lua')
-rw-r--r--lualib/lua_mime.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/lualib/lua_mime.lua b/lualib/lua_mime.lua
index d94335f5b..3b8344e5f 100644
--- a/lualib/lua_mime.lua
+++ b/lualib/lua_mime.lua
@@ -526,8 +526,10 @@ exports.modify_headers = function(task, hdr_alterations)
local add_tbl = hdr_flattened[hname].add
if hdr.value then
table.insert(add_tbl, {hdr.order or -1, hdr.value})
- else
- table.insert(add_tbl, {-1, hdr})
+ elseif type(hdr) == 'table' then
+ for _,v in ipairs(hdr) do
+ table.insert(add_tbl, {-1, v})
+ end
end
end