commit cc0cca0: [Fix] Arc: Sort headers by their i= value
Vsevolod Stakhov
vsevolod at highsecure.ru
Tue Sep 8 14:35:11 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-09-08 15:28:42 +0100
URL: https://github.com/rspamd/rspamd/commit/cc0cca0cf3a8762227f89f88150f41f4c0aee6c1
[Fix] Arc: Sort headers by their i= value
---
src/plugins/lua/arc.lua | 5 +++++
1 file changed, 5 insertions(+)
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)
More information about the Commits
mailing list