]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
config: Fail if local_name contains spaces
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 4 Mar 2025 14:36:26 +0000 (16:36 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Thu, 6 Mar 2025 06:12:52 +0000 (06:12 +0000)
It's no longer a supported way to configure multiple matches.

src/config/config-parser.c

index c83ef89d575e0e1563a9f3169984680c439e5083..e1d3d137986321722e2eae1f34be327537a30632 100644 (file)
@@ -1233,7 +1233,9 @@ int config_filter_parse(struct config_filter *filter, pool_t pool,
                else
                        filter->local_host = p_strdup(pool, value);
        } else if (strcmp(key, "local_name") == 0) {
-               if (parent->remote_bits > 0)
+               if (strchr(value, ' ') != NULL)
+                       *error_r = "Multiple names no longer supported in local_name value";
+               else if (parent->remote_bits > 0)
                        *error_r = "remote { local_name { .. } } not allowed (use local_name { remote { .. } } instead)";
                else if (parent->protocol != NULL)
                        *error_r = "protocol { local_name { .. } } not allowed (use local_name { protocol { .. } } instead)";