From: Timo Sirainen Date: Tue, 24 Mar 2026 10:03:08 +0000 (+0200) Subject: [PATCH 2/2] dsync: Fix escaping mail or attribute value that begins with a "." line X-Git-Tag: archive/raspbian/1%2.4.1+dfsg1-6+rpi1+deb13u7^2~14 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0bc78bd3879747bfe7ec3ed282a0276f16744c82;p=dovecot.git [PATCH 2/2] dsync: Fix escaping mail or attribute value that begins with a "." line 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 --- diff --git a/src/doveadm/dsync/dsync-ibc-stream.c b/src/doveadm/dsync/dsync-ibc-stream.c index 0b30382..390c9a5 100644 --- a/src/doveadm/dsync/dsync-ibc-stream.c +++ b/src/doveadm/dsync/dsync-ibc-stream.c @@ -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);