dovecot-2.2: imap: GETMETADATA was returning mailbox name as UTF...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Oct 3 14:12:27 UTC 2014
details: http://hg.dovecot.org/dovecot-2.2/rev/5446d1877c7e
changeset: 17868:5446d1877c7e
user: Timo Sirainen <tss at iki.fi>
date: Fri Oct 03 17:11:58 2014 +0300
description:
imap: GETMETADATA was returning mailbox name as UTF-8 instead of mUTF-7
diffstat:
src/imap/cmd-getmetadata.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diffs (26 lines):
diff -r 554b021d6a3f -r 5446d1877c7e src/imap/cmd-getmetadata.c
--- a/src/imap/cmd-getmetadata.c Fri Oct 03 16:57:39 2014 +0300
+++ b/src/imap/cmd-getmetadata.c Fri Oct 03 17:11:58 2014 +0300
@@ -5,6 +5,7 @@
#include "istream.h"
#include "ostream.h"
#include "mailbox-list-iter.h"
+#include "imap-utf7.h"
#include "imap-quote.h"
#include "imap-metadata.h"
@@ -105,9 +106,13 @@
str = t_str_new(64);
if (!ctx->first_entry_sent) {
+ string_t *mailbox_mutf7 = t_str_new(64);
+
ctx->first_entry_sent = TRUE;
str_append(str, "* METADATA ");
- imap_append_astring(str, mailbox_get_vname(ctx->box));
+ if (imap_utf8_to_utf7(mailbox_get_vname(ctx->box), mailbox_mutf7) < 0)
+ i_unreached();
+ imap_append_astring(str, str_c(mailbox_mutf7));
str_append(str, " (");
/* nothing can be sent until untagged METADATA is finished */
More information about the dovecot-cvs
mailing list