aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2022-08-29 21:20:52 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2022-08-29 21:21:38 +0100
commit66a6a02d0147dc7a5761bb812097561ae2dbf8c0 (patch)
treefa089a72b54616c6152c2e994110ed16c97caa48
parente2d81fa602056d0121fb8d0ec81ba491283d8bab (diff)
downloadrspamd-66a6a02d0147dc7a5761bb812097561ae2dbf8c0.tar.gz
rspamd-66a6a02d0147dc7a5761bb812097561ae2dbf8c0.zip
[Minor] Require number as header order
Issue: #4246
-rw-r--r--lualib/lua_mime.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lualib/lua_mime.lua b/lualib/lua_mime.lua
index 01a2fc95e..50c6ccd43 100644
--- a/lualib/lua_mime.lua
+++ b/lualib/lua_mime.lua
@@ -527,7 +527,7 @@ exports.modify_headers = function(task, hdr_alterations)
end
local add_tbl = hdr_flattened[hname].add
if hdr.value then
- table.insert(add_tbl, {hdr.order or -1, hdr.value})
+ table.insert(add_tbl, {tonumber(hdr.order) or -1, hdr.value})
elseif type(hdr) == 'table' then
for _,v in ipairs(hdr) do
table.insert(add_tbl, {-1, v})