commit 66a6a02: [Minor] Require number as header order

Vsevolod Stakhov vsevolod at rspamd.com
Mon Aug 29 20:28:04 UTC 2022


Author: Vsevolod Stakhov
Date: 2022-08-29 21:20:52 +0100
URL: https://github.com/rspamd/rspamd/commit/66a6a02d0147dc7a5761bb812097561ae2dbf8c0 (HEAD -> master)

[Minor] Require number as header order
Issue: #4246

---
 lualib/lua_mime.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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})


More information about the Commits mailing list