[dovecot-cvs] dovecot/src/lib-storage/index/dbox dbox-storage.c, 1.15.2.1, 1.15.2.2

tss-movial at dovecot.org tss-movial at dovecot.org
Fri May 12 11:12:58 EEST 2006


Update of /var/lib/cvs/dovecot/src/lib-storage/index/dbox
In directory talvi:/tmp/cvs-serv13916/lib-storage/index/dbox

Modified Files:
      Tag: branch_1_0
	dbox-storage.c 
Log Message:
Don't allow "." and ".." mailbox names/masks.



Index: dbox-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-storage.c,v
retrieving revision 1.15.2.1
retrieving revision 1.15.2.2
diff -u -d -r1.15.2.1 -r1.15.2.2
--- dbox-storage.c	10 May 2006 09:05:20 -0000	1.15.2.1
+++ dbox-storage.c	12 May 2006 08:12:56 -0000	1.15.2.2
@@ -185,6 +185,12 @@
 		newdir = p[0] == '/';
 	}
 
+	if (mask[0] == '.' && (mask[1] == '\0' ||
+			       (mask[1] == '.' && mask[2] == '\0'))) {
+		/* "." and ".." aren't allowed. */
+		return FALSE;
+	}
+
 	return TRUE;
 }
 



More information about the dovecot-cvs mailing list