Skip to content

Commit bac9565

Browse files
committed
Merge pull request trusteddomainproject#145 from glts/quote-result
Quote results in Authentication-Results if necessary trusteddomainproject#145
2 parents fb1defc + 5d48837 commit bac9565

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

libopenarc/arc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3715,7 +3715,7 @@ arc_chain_custody_str(ARC_MESSAGE *msg, u_char *buf, size_t buflen)
37153715
kvset = msg->arc_sets[set].arcset_ams->hdr_data;
37163716
str = arc_param_get(kvset, "d");
37173717
(void) arc_dstring_printf(tmpbuf, "%s%s",
3718-
(set < msg->arc_nsets ? ":" : ""),
3718+
(set < msg->arc_nsets - 1 ? ":" : ""),
37193719
str);
37203720
}
37213721

openarc/openarc.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3851,14 +3851,24 @@ mlfi_eom(SMFICTX *ctx)
38513851

38523852
if (ipout != NULL)
38533853
{
3854+
_Bool quote = strchr(ipout, ':') != NULL;
3855+
38543856
arcf_dstring_printf(afc->mctx_tmpstr,
3855-
" smtp.remote-ip=%s", ipout);
3857+
" smtp.remote-ip=%s%s%s",
3858+
quote ? "\"" : "",
3859+
ipout,
3860+
quote ? "\"" : "");
38563861
}
38573862

38583863
if (conf->conf_finalreceiver && arcchainlen > 0)
38593864
{
3865+
_Bool quote = strchr(arcchainbuf, ':') != NULL;
3866+
38603867
arcf_dstring_printf(afc->mctx_tmpstr,
3861-
" arc.chain=%s", arcchainbuf);
3868+
" arc.chain=%s%s%s",
3869+
quote ? "\"" : "",
3870+
arcchainbuf,
3871+
quote ? "\"" : "");
38623872
}
38633873

38643874
if (arcf_insheader(ctx, 0, AUTHRESULTSHDR,

0 commit comments

Comments
 (0)