From: Timo Sirainen Date: Mon, 3 Nov 2025 08:22:54 +0000 (+0200) Subject: config: Fail if trying to give section name for strlist or boollist setting X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4430847ea5e4931aa25d8175fb093d3d3b199758;p=thirdparty%2Fdovecot%2Fcore.git config: Fail if trying to give section name for strlist or boollist setting For example this should fail: mail_plugins foo { } --- diff --git a/src/config/config-parser.c b/src/config/config-parser.c index 91e5fdaf85..61a7e09555 100644 --- a/src/config/config-parser.c +++ b/src/config/config-parser.c @@ -3254,6 +3254,9 @@ void config_parser_apply_line(struct config_parser_context *ctx, if (def->type != SET_STRLIST && def->type != SET_BOOLLIST) { ctx->error = p_strdup_printf(ctx->pool, "Setting %s cannot be used as a section", key); + } else if (line->value[0] != '\0') { + ctx->error = p_strdup_printf(ctx->pool, + "Setting %s cannot have a value for the section", key); } break; }