dovecot-2.0: doveadm: force-resync now fails if mailbox name isn...

dovecot at dovecot.org dovecot at dovecot.org
Fri May 28 14:31:24 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/b6c027d9631f
changeset: 11413:b6c027d9631f
user:      Timo Sirainen <tss at iki.fi>
date:      Fri May 28 12:31:22 2010 +0100
description:
doveadm: force-resync now fails if mailbox name isn't valid UTF-8

diffstat:

 src/doveadm/doveadm-mail.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (15 lines):

diff -r 046948ccdbfb -r b6c027d9631f src/doveadm/doveadm-mail.c
--- a/src/doveadm/doveadm-mail.c	Fri May 28 12:31:05 2010 +0100
+++ b/src/doveadm/doveadm-mail.c	Fri May 28 12:31:22 2010 +0100
@@ -79,8 +79,9 @@
 	const char *orig_mailbox = mailbox;
 
 	str = t_str_new(128);
-	if (imap_utf8_to_utf7(mailbox, str) == 0)
-		mailbox = str_c(str);
+	if (imap_utf8_to_utf7(mailbox, str) < 0)
+		i_fatal("Mailbox name not valid UTF-8: %s", mailbox);
+	mailbox = str_c(str);
 
 	ns = mail_namespace_find(user->namespaces, &mailbox);
 	if (ns == NULL)


More information about the dovecot-cvs mailing list