[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-storage.c,
1.146, 1.147
cras at dovecot.org
cras at dovecot.org
Thu Jun 8 19:56:48 EEST 2006
Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv30643/mbox
Modified Files:
mbox-storage.c
Log Message:
Don't allow "." and ".." mailbox names/masks.
Index: mbox-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-storage.c,v
retrieving revision 1.146
retrieving revision 1.147
diff -u -d -r1.146 -r1.147
--- mbox-storage.c 8 Jun 2006 12:49:39 -0000 1.146
+++ mbox-storage.c 8 Jun 2006 16:56:46 -0000 1.147
@@ -388,6 +388,11 @@
}
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