[dovecot-cvs] dovecot/src/lib-storage/list mailbox-list-fs.c, 1.3, 1.4
tss at dovecot.org
tss at dovecot.org
Thu Mar 1 12:30:15 UTC 2007
Update of /var/lib/cvs/dovecot/src/lib-storage/list
In directory talvi:/tmp/cvs-serv16449
Modified Files:
mailbox-list-fs.c
Log Message:
Don't allow using "foo/." or "foo/.." in the masks. Although that shouldn't
really matter.
Index: mailbox-list-fs.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/list/mailbox-list-fs.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- mailbox-list-fs.c 3 Jan 2007 22:40:34 -0000 1.3
+++ mailbox-list-fs.c 1 Mar 2007 12:30:13 -0000 1.4
@@ -64,9 +64,10 @@
if (p[0] == '/')
return FALSE; /* // */
if (p[0] == '.') {
- if (p[1] == '/')
+ if (p[1] == '/' || p[1] == '\0')
return FALSE; /* ./ */
- if (p[1] == '.' && p[2] == '/')
+ if (p[1] == '.' &&
+ (p[2] == '/' || p[2] == '\0'))
return FALSE; /* ../ */
}
if (maildir_len > 0 &&
More information about the dovecot-cvs
mailing list