dovecot-2.0: lib-storage: Fail if list=yes namespace prefix star...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Sep 15 18:20:25 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/c39dcf0504e6
changeset: 12122:c39dcf0504e6
user: Timo Sirainen <tss at iki.fi>
date: Wed Sep 15 16:20:21 2010 +0100
description:
lib-storage: Fail if list=yes namespace prefix starts with hierarchy separator.
diffstat:
src/lib-storage/mail-namespace.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diffs (19 lines):
diff -r 14a6e526900d -r c39dcf0504e6 src/lib-storage/mail-namespace.c
--- a/src/lib-storage/mail-namespace.c Wed Sep 15 16:07:15 2010 +0100
+++ b/src/lib-storage/mail-namespace.c Wed Sep 15 16:20:21 2010 +0100
@@ -231,6 +231,15 @@
"to end with separator", ns->prefix);
return FALSE;
}
+ if (*ns->prefix != '\0' &&
+ (ns->flags & (NAMESPACE_FLAG_LIST_PREFIX |
+ NAMESPACE_FLAG_LIST_CHILDREN)) != 0 &&
+ ns->prefix[0] == ns->sep) {
+ *error_r = t_strdup_printf(
+ "list=yes requires prefix=%s "
+ "not to start with separator", ns->prefix);
+ return FALSE;
+ }
if ((ns->flags & (NAMESPACE_FLAG_LIST_PREFIX |
NAMESPACE_FLAG_LIST_CHILDREN)) != 0) {
if (list_sep == '\0')
More information about the dovecot-cvs
mailing list