]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: config: missing goto out after parsing an incorrect ACL character
authorWilly Tarreau <w@1wt.eu>
Wed, 12 Apr 2017 16:54:00 +0000 (18:54 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 12 Apr 2017 16:57:04 +0000 (18:57 +0200)
The error doesn't prevent checking for other errors after an invalid
character was detected in an ACL name. Better quit ASAP to avoid risking
to emit garbled and confusing error messages if something else fails on
the same line.

This should be backported to 1.7, 1.6 and 1.5.

src/cfgparse.c

index e1b6b3ebabc32b8e097ad69a249350312a9b9847..47d33cf1b05ff72b42382e90bf8d6bdb3f41899f 100644 (file)
@@ -3154,6 +3154,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
                        Alert("parsing [%s:%d] : character '%c' is not permitted in acl name '%s'.\n",
                              file, linenum, *err, args[1]);
                        err_code |= ERR_ALERT | ERR_FATAL;
+                       goto out;
                }
 
                if (parse_acl((const char **)args + 1, &curproxy->acl, &errmsg, &curproxy->conf.args, file, linenum) == NULL) {