diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-09-08 15:28:42 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-09-08 15:28:42 +0100 |
commit | cc0cca0cf3a8762227f89f88150f41f4c0aee6c1 (patch) | |
tree | 5805f6f2b089efcc8fed7547f371ea6e9d9d6467 /src/plugins/lua/arc.lua | |
parent | e12a0910cf46c93ce7a2210d0d8a91c4b538f589 (diff) | |
download | rspamd-cc0cca0cf3a8762227f89f88150f41f4c0aee6c1.tar.gz rspamd-cc0cca0cf3a8762227f89f88150f41f4c0aee6c1.zip |
[Fix] Arc: Sort headers by their i= value
Diffstat (limited to 'src/plugins/lua/arc.lua')
-rw-r--r-- | src/plugins/lua/arc.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/lua/arc.lua b/src/plugins/lua/arc.lua index ce6f1e02e..dc10476d7 100644 --- a/src/plugins/lua/arc.lua +++ b/src/plugins/lua/arc.lua @@ -121,6 +121,11 @@ local function parse_arc_header(hdr, target) target[i].header = hdr[i].decoded target[i].raw_header = hdr[i].value end + + -- sort by i= attribute + table.sort(target, function(a, b) + return (a.i or 0) < (b.i or 0) + end) end local function arc_validate_seals(task, seals, sigs, seal_headers, sig_headers) |