dovecot-2.0: IMAP: Treat "namespace prefix/" as invalid mailbox ...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Jun 3 16:33:49 EEST 2011
details: http://hg.dovecot.org/dovecot-2.0/rev/e371cb27c5b6
changeset: 12833:e371cb27c5b6
user: Timo Sirainen <tss at iki.fi>
date: Fri Jun 03 16:33:43 2011 +0300
description:
IMAP: Treat "namespace prefix/" as invalid mailbox name.
diffstat:
src/imap/imap-commands-util.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diffs (15 lines):
diff -r 4bc98c94883f -r e371cb27c5b6 src/imap/imap-commands-util.c
--- a/src/imap/imap-commands-util.c Fri Jun 03 15:49:50 2011 +0300
+++ b/src/imap/imap-commands-util.c Fri Jun 03 16:33:43 2011 +0300
@@ -59,6 +59,11 @@
storage_name = t_strndup(storage_name, storage_name_len-1);
}
+ if (strcmp(mailbox, ns->prefix) == 0) {
+ client_send_tagline(cmd, "NO Invalid mailbox name.");
+ return NULL;
+ }
+
if (ns->real_sep != ns->sep && ns->prefix_len < strlen(mailbox)) {
/* make sure there are no real separators used in the mailbox
name. */
More information about the dovecot-cvs
mailing list