]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm: force-resync now fails if mailbox name isn't valid UTF-8
authorTimo Sirainen <tss@iki.fi>
Fri, 28 May 2010 11:31:22 +0000 (12:31 +0100)
committerTimo Sirainen <tss@iki.fi>
Fri, 28 May 2010 11:31:22 +0000 (12:31 +0100)
--HG--
branch : HEAD

src/doveadm/doveadm-mail.c

index 51e207577a93adeb8366bdfd43150ca537082861..3201ab77d0863a1fd9e66da9a4ff71893c515ea0 100644 (file)
@@ -79,8 +79,9 @@ mailbox_find_and_open(struct mail_user *user, const char *mailbox)
        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)