diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2018-04-09 15:08:34 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2018-04-09 15:25:54 +0100 |
commit | 0c2250d167e858666f6ab372fe34dbd9e682932d (patch) | |
tree | d8f18238ff20d8321846ba1d68efb2099480a376 /src | |
parent | d341f2a27e689098e23c4eae2f78b59d053d5060 (diff) |
ARC: fix signing when DKIM-signing is also being done
The ordering of headers being signed was wrong when a message
being forwarded arrived with a dkim signature
Diffstat (limited to 'src')
-rw-r--r-- | src/src/arc.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/src/arc.c b/src/src/arc.c index 39c081193..6f567dc5f 100644 --- a/src/src/arc.c +++ b/src/src/arc.c @@ -1565,18 +1565,17 @@ string_from_gstring(sigheaders); if ((rheaders = arc_sign_scan_headers(&arc_sign_ctx, sigheaders))) { hdr_rlist ** rp; - for (rp = &rheaders; *rp; ) rp = &(*rp)->prev; - *rp = headers_rlist; - headers_rlist = rheaders; + for (rp = &headers_rlist; *rp; ) rp = &(*rp)->prev; + *rp = rheaders; } -else - rheaders = headers_rlist; /* Finally, build a normal-order headers list */ /*XXX only needed for hunt-the-AR? */ +/*XXX also, we really should be accepting any number of ADMD-matching ARs */ { header_line * hnext = NULL; - for (; rheaders; hnext = rheaders->h, rheaders = rheaders->prev) + for (rheaders = headers_rlist; rheaders; + hnext = rheaders->h, rheaders = rheaders->prev) rheaders->h->next = hnext; headers = hnext; } |