Blame SOURCES/dovecot-2.3.13-CVE_2020_24386-part1.patch

27f02a
From 68165c8acc6d32a06f8dce2ef515c714c243ce4e Mon Sep 17 00:00:00 2001
27f02a
From: Timo Sirainen <timo.sirainen@open-xchange.com>
27f02a
Date: Mon, 17 Aug 2020 18:33:20 +0300
27f02a
Subject: [PATCH] imap: Escape tag when sending it to imap-hibernate process
27f02a
27f02a
---
27f02a
 src/imap/imap-client-hibernate.c | 6 ++++--
27f02a
 1 file changed, 4 insertions(+), 2 deletions(-)
27f02a
27f02a
diff --git a/src/imap/imap-client-hibernate.c b/src/imap/imap-client-hibernate.c
27f02a
index f639d722cb..4ef323453c 100644
27f02a
--- a/src/imap/imap-client-hibernate.c
27f02a
+++ b/src/imap/imap-client-hibernate.c
27f02a
@@ -97,8 +97,10 @@ static void imap_hibernate_write_cmd(struct client *client, string_t *cmd,
27f02a
 		str_printfa(cmd, "\tuid=%s", dec2str(user->uid));
27f02a
 	if (user->gid != (gid_t)-1)
27f02a
 		str_printfa(cmd, "\tgid=%s", dec2str(user->gid));
27f02a
-	if (tag != NULL)
27f02a
-		str_printfa(cmd, "\ttag=%s", tag);
27f02a
+	if (tag != NULL) {
27f02a
+		str_append(cmd, "\ttag=");
27f02a
+		str_append_tabescaped(cmd, tag);
27f02a
+	}
27f02a
 	str_append(cmd, "\tstats=");
27f02a
 	str_append_tabescaped(cmd, client_stats(client));
27f02a
 	if (client->command_queue != NULL &&