Mercurial > dovecot > core-2.2
changeset 18279:6e3cb68b274d
lib-storage: Allow up to 255 chars in a single mailbox hierarchy name.
This also reduces the max number of hierarchy levels, but 16 should still be
enough for normal uses.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 01 Mar 2015 22:14:01 +0200 |
parents | 7f67e5c86af9 |
children | 7b2275ae8c19 |
files | src/lib-storage/mailbox-list.c |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/mailbox-list.c Fri Feb 27 14:29:10 2015 +0200 +++ b/src/lib-storage/mailbox-list.c Sun Mar 01 22:14:01 2015 +0200 @@ -27,13 +27,14 @@ #include <dirent.h> #include <sys/stat.h> -/* 20 * (200+1) < 4096 which is the standard PATH_MAX. Having these settings +/* 16 * (255+1) = 4096 which is the standard PATH_MAX. Having these settings prevents malicious user from creating eg. "a/a/a/.../a" mailbox name and then start renaming them to larger names from end to beginning, which eventually would start causing the failures when trying to use too - long mailbox names. */ -#define MAILBOX_MAX_HIERARCHY_LEVELS 20 -#define MAILBOX_MAX_HIERARCHY_NAME_LENGTH 200 + long mailbox names. 255 is the standard single directory name length, so + allow up to that high. */ +#define MAILBOX_MAX_HIERARCHY_LEVELS 16 +#define MAILBOX_MAX_HIERARCHY_NAME_LENGTH 255 struct mailbox_list_module_register mailbox_list_module_register = { 0 };