]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: Escape tag when sending it to imap-hibernate process
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 17 Aug 2020 15:33:20 +0000 (18:33 +0300)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 4 Jan 2021 22:59:38 +0000 (00:59 +0200)
src/imap/imap-client-hibernate.c

index f639d722cbf43ab97a2c0b354dcb514a20555350..4ef323453c36efd85c60705be9907f3bf0792c69 100644 (file)
@@ -97,8 +97,10 @@ static void imap_hibernate_write_cmd(struct client *client, string_t *cmd,
                str_append(cmd, "\tmailbox=");
                str_append_tabescaped(cmd, mailbox_get_vname(client->mailbox));
        }
-       if (tag != NULL)
-               str_printfa(cmd, "\ttag=%s", tag);
+       if (tag != NULL) {
+               str_append(cmd, "\ttag=");
+               str_append_tabescaped(cmd, tag);
+       }
        str_append(cmd, "\tstats=");
        str_append_tabescaped(cmd, client_stats(client));
        if (client->command_queue != NULL &&