From: Timo Sirainen Date: Tue, 4 Mar 2025 14:36:26 +0000 (+0200) Subject: config: Fail if local_name contains spaces X-Git-Tag: 2.4.1~102 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=276a46811555b0b2f8a12eab27aa28597b6f3f44;p=thirdparty%2Fdovecot%2Fcore.git config: Fail if local_name contains spaces It's no longer a supported way to configure multiple matches. --- diff --git a/src/config/config-parser.c b/src/config/config-parser.c index c83ef89d57..e1d3d13798 100644 --- a/src/config/config-parser.c +++ b/src/config/config-parser.c @@ -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)";