]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
submission-login: proxy: Fix omission of spaces between XCLIENT command parameters.
authorAnton Dollmaier <antondollmaier@aditsystems.de>
Thu, 27 Sep 2018 21:00:22 +0000 (23:00 +0200)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Thu, 21 Mar 2019 08:02:37 +0000 (10:02 +0200)
It would send for example:

> XCLIENT ADDR=10.0.1.2PORT=39074

The other end will obviously not accept this.

--
Commit message modified by Stephan Bosch

src/submission-login/submission-proxy.c

index d3e89abc29861377bf91d6b88e606189651ea74f..466ee57a8db835e621e32f091b472fde04ce16b7 100644 (file)
@@ -51,19 +51,19 @@ proxy_send_xclient(struct submission_client *client, struct ostream *output)
        }
 
        str = t_str_new(128);
-       str_append(str, "XCLIENT ");
+       str_append(str, "XCLIENT");
        if (str_array_icase_find(client->proxy_xclient, "ADDR")) {
-               str_append(str, "ADDR=");
+               str_append(str, " ADDR=");
                str_append(str, net_ip2addr(&client->common.ip));
        }
        if (str_array_icase_find(client->proxy_xclient, "PORT"))
-               str_printfa(str, "PORT=%u", client->common.remote_port);
+               str_printfa(str, " PORT=%u", client->common.remote_port);
        if (str_array_icase_find(client->proxy_xclient, "SESSION")) {
-               str_append(str, "SESSION=");
+               str_append(str, " SESSION=");
                str_append(str, client_get_session_id(&client->common));
        }
        if (str_array_icase_find(client->proxy_xclient, "TTL"))
-               str_printfa(str, "TTL=%u", client->common.proxy_ttl - 1);
+               str_printfa(str, " TTL=%u", client->common.proxy_ttl - 1);
        if (str_array_icase_find(client->proxy_xclient, "FORWARD") &&
                str_len(fwd) > 0) {
                str_append(str, " FORWARD=");