From: Timo Sirainen Date: Thu, 23 Aug 2012 19:33:23 +0000 (+0300) Subject: lib-storage: Verify that namespace prefix is valid UTF8 string. X-Git-Tag: 2.1.10~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=938fbc319fc0baa44257e9241049b88cb91efef1;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Verify that namespace prefix is valid UTF8 string. --- diff --git a/src/lib-storage/mail-storage-settings.c b/src/lib-storage/mail-storage-settings.c index 206af8d692..2835ec966a 100644 --- a/src/lib-storage/mail-storage-settings.c +++ b/src/lib-storage/mail-storage-settings.c @@ -444,6 +444,11 @@ static bool namespace_settings_check(void *_set, pool_t pool ATTR_UNUSED, name); return FALSE; } + if (!uni_utf8_str_is_valid(name)) { + *error_r = t_strdup_printf("Namespace prefix not valid UTF8: %s", + name); + return FALSE; + } if (ns->alias_for != NULL) { if (array_is_created(&ns->user_set->namespaces)) {