From 1c1e571f549f09f6547ed142f4b3a725dd9f7245 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 6 Dec 2010 00:13:28 +0000 Subject: [PATCH] lib-storage: Mailbox directory creation didn't properly enforce that the name was valid. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib-storage/mailbox-list.c b/src/lib-storage/mailbox-list.c index 97827e134c..9d13953e6d 100644 --- a/src/lib-storage/mailbox-list.c +++ b/src/lib-storage/mailbox-list.c @@ -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; -- 2.47.3