]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Use case-insensitive ns_prefix/INBOX only for shared namespace
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 22 Oct 2025 11:38:28 +0000 (14:38 +0300)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 22 Oct 2025 11:38:28 +0000 (14:38 +0300)
For example OtherNamespace/Inbox shouldn't be converted to INBOX.

Broken by 776d3e6f408ae5c4f903c4ed9e906d84e3e741a1

src/lib-storage/mail-storage.c

index 313854cdea1ebe89c9328c02ff9d450184da2356..757b71aa6aa0afbae8133ae3cc1d7ef4c6750020 100644 (file)
@@ -1147,6 +1147,7 @@ struct mailbox *mailbox_alloc(struct mailbox_list *list, const char *vname,
                }
 
                if ((new_list->ns->flags & NAMESPACE_FLAG_INBOX_ANY) != 0 &&
+                   new_list->ns->type == MAIL_NAMESPACE_TYPE_SHARED &&
                    str_begins(vname, new_list->ns->prefix, &suffix) &&
                    strcasecmp(suffix, "INBOX") == 0 &&
                    strcmp(suffix, "INBOX") != 0) {