]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lmtp: lmtp-proxy - Sanitize response in REFERRAL parse error.
authorStephan Bosch <stephan.bosch@open-xchange.com>
Sun, 21 Nov 2021 12:27:35 +0000 (13:27 +0100)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Mon, 17 Jan 2022 11:52:10 +0000 (13:52 +0200)
src/lmtp/lmtp-proxy.c

index 205acd21b89405d2748017b1c9c19b44746bd3b7..c87b99641cd0946f1a0bf1a33bf7faf9004decee 100644 (file)
@@ -6,6 +6,7 @@
 #include "ostream.h"
 #include "iostream-ssl.h"
 #include "str.h"
+#include "str-sanitize.h"
 #include "strescape.h"
 #include "time-util.h"
 #include "smtp-common.h"
@@ -707,7 +708,7 @@ lmtp_proxy_rcpt_redirect(struct lmtp_proxy_recipient *lprcpt,
                                           &host, &ip, &port, &error) < 0) {
                e_error(rcpt->event,
                        "Backend server returned invalid redirect '%s': %s",
-                       smtp_reply_log(proxy_reply), error);
+                       str_sanitize(smtp_reply_log(proxy_reply), 160), error);
                smtp_server_recipient_reply(rcpt, 451, "4.3.0",
                                            "Temporary internal proxy error");
                return;