dovecot: Don't crash if mailbox named INBOX is listed in prefixl...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Aug 27 17:19:53 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/5313cbcfccc6
changeset: 6318:5313cbcfccc6
user: Timo Sirainen <tss at iki.fi>
date: Mon Aug 27 17:19:49 2007 +0300
description:
Don't crash if mailbox named INBOX is listed in prefixless namespace, but
which doesn't have inbox=yes. Instead the mailbox is simply not listed.
diffstat:
1 file changed, 7 insertions(+), 1 deletion(-)
src/imap/cmd-list.c | 8 +++++++-
diffs (21 lines):
diff -r 3cee177eced6 -r 5313cbcfccc6 src/imap/cmd-list.c
--- a/src/imap/cmd-list.c Fri Aug 24 21:43:27 2007 +0300
+++ b/src/imap/cmd-list.c Mon Aug 27 17:19:49 2007 +0300
@@ -315,10 +315,16 @@ list_namespace_mailboxes(struct cmd_list
flags = info->flags;
if (strcasecmp(name, "INBOX") == 0) {
- i_assert((ctx->ns->flags & NAMESPACE_FLAG_INBOX) != 0);
if (ctx->inbox_found) {
/* we already listed this at the beginning
of handling INBOX/ namespace */
+ continue;
+ }
+ if ((ctx->ns->flags & NAMESPACE_FLAG_INBOX) == 0) {
+ /* INBOX is in non-empty prefix namespace,
+ and we're now listing prefixless namespace
+ that contains INBOX. There's no way we can
+ show this mailbox. */
continue;
}
ctx->inbox_found = TRUE;
More information about the dovecot-cvs
mailing list