]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
config: Avoid panic if using auth settings inside local/remote filter
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 8 Nov 2024 11:11:47 +0000 (13:11 +0200)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 12 Feb 2025 10:34:15 +0000 (12:34 +0200)
Change it to a normal error instead.

src/config/config-parser.c

index 20640afbb98bf5fe587900f5ed50254ca28fa007..24dad6dcec7558b4147bdc5190c731d614e53fb6 100644 (file)
@@ -1283,10 +1283,11 @@ config_filter_add_new_filter(struct config_parser_context *ctx,
                        i_assert(filter_info != NULL);
                        if (config_apply_line(ctx, filter_def->key,
                                              escaped_value, NULL) < 0) {
-                               i_panic("BUG: Invalid setting definitions: "
+                               ctx->error = p_strdup_printf(ctx->pool,
                                        "Failed to set %s=%s for struct %s: %s",
                                        filter_def->key, escaped_value,
                                        filter_info->name, ctx->error);
+                               return FALSE;
                        }
                }
                ctx->cur_section->filter_parser =