]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Arc: Specify explicit order for the headers added
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 7 Oct 2021 08:50:14 +0000 (09:50 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 7 Oct 2021 08:50:14 +0000 (09:50 +0100)
src/plugins/lua/arc.lua

index 0e575c5fdf09b9740ec8608819fabe295e71ee1b..eeff889f4e51681936a153633506fb3185c52c86 100644 (file)
@@ -541,7 +541,9 @@ local function arc_sign_seal(task, params, header)
       ['ARC-Message-Signature'] = {order = 1, value = header},
       ['ARC-Seal'] = {order = 1, value = lua_util.fold_header(task,
               'ARC-Seal', cur_arc_seal) }
-    }
+    },
+    -- RFC requires a strict order for these headers to be inserted
+    order = {'ARC-Authentication-Results', 'ARC-Message-Signature', 'ARC-Seal'},
   })
   task:insert_result(settings.sign_symbol, 1.0,
       string.format('%s:s=%s:i=%d', params.domain, params.selector, cur_idx))