Skip to content

Commit

Permalink
Quote results in Authentication-Results if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
glts committed Jul 9, 2021
1 parent eb430db commit 5d48837
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libopenarc/arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3711,7 +3711,7 @@ arc_chain_custody_str(ARC_MESSAGE *msg, u_char *buf, size_t buflen)
kvset = msg->arc_sets[set].arcset_ams->hdr_data;
str = arc_param_get(kvset, "d");
(void) arc_dstring_printf(tmpbuf, "%s%s",
(set < msg->arc_nsets ? ":" : ""),
(set < msg->arc_nsets - 1 ? ":" : ""),
str);
}

Expand Down
14 changes: 12 additions & 2 deletions openarc/openarc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3851,14 +3851,24 @@ mlfi_eom(SMFICTX *ctx)

if (ipout != NULL)
{
_Bool quote = strchr(ipout, ':') != NULL;

arcf_dstring_printf(afc->mctx_tmpstr,
" smtp.remote-ip=%s", ipout);
" smtp.remote-ip=%s%s%s",
quote ? "\"" : "",
ipout,
quote ? "\"" : "");
}

if (conf->conf_finalreceiver && arcchainlen > 0)
{
_Bool quote = strchr(arcchainbuf, ':') != NULL;

arcf_dstring_printf(afc->mctx_tmpstr,
" arc.chain=%s", arcchainbuf);
" arc.chain=%s%s%s",
quote ? "\"" : "",
arcchainbuf,
quote ? "\"" : "");
}

if (arcf_insheader(ctx, 1, AUTHRESULTSHDR,
Expand Down

0 comments on commit 5d48837

Please sign in to comment.