From ef191c46d7569712c538e93031fb3a6dca88defa Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 8 Jun 2026 13:43:25 +0200 Subject: [PATCH] BUG/MINOR: acl: report "ACL" not "map" in ACL ID lookup failures As reported by @broxio in issue #3411, when trying to delete an ACL by its name, in case of error the message says "unknown map identifier". We need to check the type to decide between map and ACL as in other messages. This can be backported to all stable branches. Thanks to @broxio for reporting the issue with a reproducer and providing this tested fix. --- src/map.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/map.c b/src/map.c index 9bca28d8b..bad758362 100644 --- a/src/map.c +++ b/src/map.c @@ -998,8 +998,12 @@ static int cli_parse_del_map(char **args, char *payload, struct appctx *appctx, /* Lookup the reference in the maps. */ ctx->ref = pat_ref_lookup_ref(args[2]); if (!ctx->ref || - !(ctx->ref->flags & ctx->display_flags)) - return cli_err(appctx, "Unknown map identifier. Please use # or .\n"); + !(ctx->ref->flags & ctx->display_flags)) { + if (ctx->display_flags == PAT_REF_MAP) + return cli_err(appctx, "Unknown map identifier. Please use # or .\n"); + else + return cli_err(appctx, "Unknown ACL identifier. Please use # or .\n"); + } /* If the entry identifier start with a '#', it is considered as * pointer id