]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: acme/cli: fix argument check and error in 'acme challenge_ready'
authorWilliam Lallemand <wlallemand@haproxy.com>
Mon, 23 Mar 2026 13:32:28 +0000 (14:32 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Mon, 23 Mar 2026 13:39:55 +0000 (14:39 +0100)
Fix the check or arguments of the 'acme challenge_ready' command which
was checking if all arguments are NULL instead of one of the argument.

Must be backported to 3.2 and later.

src/acme.c

index 501cba55a579c191387f7eba3ff93f5701ae7084..5d6b64109631bc8bea0aa5180bccf54b31b5153e 100644 (file)
@@ -2770,8 +2770,8 @@ static int cli_acme_chall_ready_parse(char **args, char *payload, struct appctx
        int remain = 0;
        struct ebmb_node *node = NULL;
 
-       if (!*args[2] && !*args[3] && !*args[4]) {
-               memprintf(&msg, ": not enough parameters\n");
+       if (!*args[2] || !*args[3] || !*args[4]) {
+               memprintf(&msg, "Not enough parameters: \"acme challenge_ready <certfile> domain <domain>\"\n");
                goto err;
        }