[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-storage.c,1.17,1.18

cras at procontrol.fi cras at procontrol.fi
Wed Nov 20 18:03:39 EET 2002


Update of /home/cvs/dovecot/src/lib-storage/index/mbox
In directory danu:/tmp/cvs-serv31239/mbox

Modified Files:
	mbox-storage.c 
Log Message:
Don't allow '*' and '%' characters in mailbox names. Maildir RENAME works
now properly when renaming folders having subfolders.



Index: mbox-storage.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/mbox/mbox-storage.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- mbox-storage.c	12 Nov 2002 05:27:30 -0000	1.17
+++ mbox-storage.c	20 Nov 2002 16:03:36 -0000	1.18
@@ -91,7 +91,9 @@
 	const char *p;
 	int newdir;
 
-	if (name[0] == '\0' || name[0] == storage->hierarchy_sep)
+	if (name[0] == '\0' || name[0] == storage->hierarchy_sep ||
+	    name[strlen(name)-1] == storage->hierarchy_sep ||
+	    strchr(name, '*') != NULL || strchr(name, '%') != NULL)
 		return FALSE;
 
 	/* make sure there's no "../" or "..\" stuff */




More information about the dovecot-cvs mailing list