From: Timo Sirainen Date: Mon, 6 Dec 2010 00:13:28 +0000 (+0000) Subject: lib-storage: Mailbox directory creation didn't properly enforce that the name was... X-Git-Tag: 2.1.alpha1~456 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c1e571f549f09f6547ed142f4b3a725dd9f7245;p=thirdparty%2Fdovecot%2Fcore.git 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. --- 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;