]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap-acl: Don't allow ACL commands for mailboxes that don't exist.
authorTimo Sirainen <tss@iki.fi>
Mon, 9 Aug 2010 14:33:20 +0000 (15:33 +0100)
committerTimo Sirainen <tss@iki.fi>
Mon, 9 Aug 2010 14:33:20 +0000 (15:33 +0100)
src/plugins/imap-acl/imap-acl-plugin.c

index 0d70b366d0b975704df99dff0ed6d7cea7b6df89..f32ee32240733af0378e78c6154d7048d5b50013 100644 (file)
@@ -70,9 +70,13 @@ acl_mailbox_open_as_admin(struct client_command_context *cmd, const char *name)
        if (ns == NULL)
                return NULL;
 
-       if (status == MAILBOX_NAME_INVALID) {
+       switch (status) {
+       case MAILBOX_NAME_INVALID:
+       case MAILBOX_NAME_VALID:
                client_fail_mailbox_name_status(cmd, name, NULL, status);
                return NULL;
+       default:
+               break;
        }
 
        /* Force opening the mailbox so that we can give a nicer error message