[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-storage.c,
1.145, 1.145.2.1
tss-movial at dovecot.org
tss-movial at dovecot.org
Fri May 12 11:13:03 EEST 2006
Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv13916/lib-storage/index/mbox
Modified Files:
Tag: branch_1_0
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.145
retrieving revision 1.145.2.1
diff -u -d -r1.145 -r1.145.2.1
--- mbox-storage.c 14 Apr 2006 12:30:22 -0000 1.145
+++ mbox-storage.c 12 May 2006 08:13:01 -0000 1.145.2.1
@@ -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