]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Mailbox directory creation didn't properly enforce that the name was...
authorTimo Sirainen <tss@iki.fi>
Mon, 6 Dec 2010 00:13:28 +0000 (00:13 +0000)
committerTimo Sirainen <tss@iki.fi>
Mon, 6 Dec 2010 00:13:28 +0000 (00:13 +0000)
The name was checked against "valid existing name" rather than "valid create
name", which mainly meant that the name could have contained control characters
and other things that weren't really intended. This couldn't be used to
cause any security holes though.

src/lib-storage/mailbox-list.c

index 97827e134cac5a5b6b3c7f8403be486613361c72..9d13953e6d6badf5207097e328b291c76dc005c3 100644 (file)
@@ -1163,7 +1163,7 @@ int mailbox_list_set_subscribed(struct mailbox_list *list,
 
 int mailbox_list_create_dir(struct mailbox_list *list, const char *name)
 {
-       if (!mailbox_list_is_valid_existing_name(list, name) || *name == '\0') {
+       if (!mailbox_list_is_valid_create_name(list, name) || *name == '\0') {
                mailbox_list_set_error(list, MAIL_ERROR_PARAMS,
                                       "Invalid mailbox name");
                return -1;