changeset 12553:4b084f357db1

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.
author Timo Sirainen <tss@iki.fi>
date Mon, 06 Dec 2010 00:43:28 +0000
parents 6a0f3010d592
children 8afad3c2928d
files src/lib-storage/mailbox-list.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/mailbox-list.c	Fri Dec 03 23:16:26 2010 +0000
+++ b/src/lib-storage/mailbox-list.c	Mon Dec 06 00:43:28 2010 +0000
@@ -1163,7 +1163,7 @@
 
 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;