]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Require number as header order
authorVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 29 Aug 2022 20:20:52 +0000 (21:20 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 29 Aug 2022 20:21:38 +0000 (21:21 +0100)
Issue: #4246

lualib/lua_mime.lua

index 01a2fc95e1e050131193ed93fc65dcd8711bdcad..50c6ccd43e6d1b243592dd0b0be6fa17b623337b 100644 (file)
@@ -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})