Skip to content

Commit

Permalink
Merge pull request trusteddomainproject#145 from glts/quote-result
Browse files Browse the repository at this point in the history
Quote results in Authentication-Results if necessary

trusteddomainproject#145
  • Loading branch information
futatuki committed Sep 14, 2024
2 parents fb1defc + 5d48837 commit bac9565
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 @@ -3715,7 +3715,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, 0, AUTHRESULTSHDR,
Expand Down

0 comments on commit bac9565

Please sign in to comment.