]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
submission-login: submission-proxy - Properly encode XCLIENT command arguments.
authorStephan Bosch <stephan.bosch@open-xchange.com>
Thu, 12 Dec 2019 08:31:48 +0000 (09:31 +0100)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Thu, 23 Jan 2020 11:28:25 +0000 (11:28 +0000)
src/submission-login/submission-proxy.c

index 6ff5c536b716ec774de5056824b4198500e4a30b..ea070001350743f6c8087e2ddb33a7b2a0f86264 100644 (file)
@@ -71,7 +71,8 @@ proxy_send_xclient(struct submission_client *client, struct ostream *output)
                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, client_get_session_id(&client->common));
+               smtp_xtext_encode_cstr(
+                       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);
@@ -80,7 +81,7 @@ proxy_send_xclient(struct submission_client *client, struct ostream *output)
 
                if (fwd != NULL) {
                        str_append(str, " FORWARD=");
-                       str_append_data(str, fwd->data, fwd->used);
+                       smtp_xtext_encode(str, fwd->data, fwd->used);
                }
        }
        str_append(str, "\r\n");