]> dgit.raspbian.org Git - dovecot.git/commitdiff
[PATCH 2/2] dsync: Fix escaping mail or attribute value that begins with a "." line
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 24 Mar 2026 10:03:08 +0000 (12:03 +0200)
committerNoah Meyerhans <noahm@debian.org>
Wed, 16 Sep 2026 19:06:35 +0000 (15:06 -0400)
Such a mail or attribute would have escaped the value parameter and the rest
of the value would have been processed as dsync stream commands.

Gbp-Pq: Name 0002-dsync-Fix-escaping-mail-or-attribute-value-that-begi.patch

src/doveadm/dsync/dsync-ibc-stream.c

index 0b3038201d6c87be38f6a82509677e816e4e5037..390c9a50c0395a29b36c5d3f1ac7d126e3b44224 100644 (file)
@@ -1533,7 +1533,7 @@ dsync_ibc_stream_send_mailbox_attribute(struct dsync_ibc *_ibc,
        dsync_ibc_stream_send_string(ibc, str);
 
        if (attr->value_stream != NULL) {
-               ibc->value_output_last = '\0';
+               ibc->value_output_last = '\n';
                ibc->value_output = attr->value_stream;
                i_stream_ref(ibc->value_output);
                (void)dsync_ibc_stream_send_value_stream(ibc);
@@ -1913,7 +1913,7 @@ dsync_ibc_stream_send_mail(struct dsync_ibc *_ibc,
        dsync_ibc_stream_send_string(ibc, str);
 
        if (mail->input != NULL) {
-               ibc->value_output_last = '\0';
+               ibc->value_output_last = '\n';
                ibc->value_output = mail->input;
                i_stream_ref(ibc->value_output);
                (void)dsync_ibc_stream_send_value_stream(ibc);