[dovecot-cvs] dovecot/src/lib-storage mailbox-list.c,1.10,1.11

tss at dovecot.org tss at dovecot.org
Fri Mar 30 22:35:09 EEST 2007


Update of /var/lib/cvs/dovecot/src/lib-storage
In directory talvi:/tmp/cvs-serv31748

Modified Files:
	mailbox-list.c 
Log Message:
Verify that mailbox name is valid before deleting it.



Index: mailbox-list.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/mailbox-list.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- mailbox-list.c	30 Mar 2007 19:30:37 -0000	1.10
+++ mailbox-list.c	30 Mar 2007 19:35:07 -0000	1.11
@@ -253,6 +253,10 @@
 
 int mailbox_list_delete_mailbox(struct mailbox_list *list, const char *name)
 {
+	if (!mailbox_list_is_valid_existing_name(list, name)) {
+		mailbox_list_set_error(list, "Invalid mailbox name");
+		return -1;
+	}
 	return list->v.delete_mailbox(list, name);
 }
 



More information about the dovecot-cvs mailing list