dovecot-2.0: lib-storage: Disallow control characters in mailbox...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Aug 7 21:22:04 EEST 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/60b76a35bb2c
changeset: 9741:60b76a35bb2c
user: Timo Sirainen <tss at iki.fi>
date: Fri Aug 07 14:21:40 2009 -0400
description:
lib-storage: Disallow control characters in mailbox names when creating them.
diffstat:
1 file changed, 7 insertions(+)
src/lib-storage/mailbox-list.c | 7 +++++++
diffs (18 lines):
diff -r 2e725e1aaac6 -r 60b76a35bb2c src/lib-storage/mailbox-list.c
--- a/src/lib-storage/mailbox-list.c Fri Aug 07 13:56:04 2009 -0400
+++ b/src/lib-storage/mailbox-list.c Fri Aug 07 14:21:40 2009 -0400
@@ -485,7 +485,14 @@ bool mailbox_list_is_valid_create_name(s
bool mailbox_list_is_valid_create_name(struct mailbox_list *list,
const char *name)
{
+ const char *p;
int ret;
+
+ /* safer to just disallow all control characters */
+ for (p = name; *p != '\0'; p++) {
+ if (*p < ' ')
+ return FALSE;
+ }
T_BEGIN {
string_t *str = t_str_new(256);
More information about the dovecot-cvs
mailing list