]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
namespace { prefix="" list=no } should never be listed.
authorTimo Sirainen <tss@iki.fi>
Mon, 6 May 2013 12:04:57 +0000 (15:04 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 6 May 2013 12:04:57 +0000 (15:04 +0300)
src/lib-storage/list/mailbox-list-iter.c

index 6abba6575d0c0416bf7811dcac27dda1dc9663d3..da9517892d5ebb8b5aea3366a780a1fbf1c13e91 100644 (file)
@@ -256,6 +256,9 @@ static bool ns_match_next(struct ns_list_iterate_context *ctx,
                /* non-listable namespace matches only with exact prefix */
                if (strncmp(ns->prefix, pattern, ns->prefix_len) != 0)
                        return FALSE;
+               /* prefix="" list=no is never listed */
+               if (ns->prefix_len == 0)
+                       return FALSE;
        }
 
        prefix_without_sep = t_strndup(ns->prefix, len);