]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: ssl: check on forbidden character on wrong value
authorWilliam Lallemand <wlallemand@haproxy.com>
Wed, 17 Apr 2024 18:28:36 +0000 (20:28 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Wed, 17 Apr 2024 19:00:25 +0000 (21:00 +0200)
The check on the forbidden '/' for the crt-store load keyword was done
on the keyword instead of the value itself.

No backport needed.

src/ssl_ckch.c

index fea0b9631b1ccd1b75ba5a67dcce202576be9bd8..81752e191083b2ba83e32ccadd9246628157b580 100644 (file)
@@ -4086,7 +4086,7 @@ static int crtstore_parse_load(char **args, int section_type, struct proxy *curp
                                if (strcmp("alias", args[cur_arg]) == 0) {
                                        int rv;
 
-                                       if (*args[cur_arg] == '/') {
+                                       if (*args[cur_arg + 1] == '/') {
                                                memprintf(err, "parsing [%s:%d] : cannot parse '%s' value '%s', '/' is forbidden as the first character.\n",
                                                          file, linenum, args[cur_arg], args[cur_arg + 1]);
                                                err_code |= ERR_ALERT | ERR_FATAL;