]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Verify that namespace prefix is valid UTF8 string.
authorTimo Sirainen <tss@iki.fi>
Thu, 23 Aug 2012 19:33:23 +0000 (22:33 +0300)
committerTimo Sirainen <tss@iki.fi>
Thu, 23 Aug 2012 19:33:23 +0000 (22:33 +0300)
src/lib-storage/mail-storage-settings.c

index 206af8d6929ef77e79c40090369e06585ebc4942..2835ec966a677d8849dc0d9e00f7831b238e2a22 100644 (file)
@@ -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)) {