BUG/MEDIUM: config: don't crash at config load time on invalid userlist names

Cyril Bont reported that passing an invalid userlist name to
http_auth_group() caused haproxy to crash at load. This was due
to an attempt to use the unresolved userlist pointer later to
resolve auth groups since we report many errors before leaving
now.

This issue does not exist in earlier versions since they immediately
abort on the first error, so no backport is needed.
This commit is contained in:
Willy Tarreau 2012-05-10 23:40:14 +02:00
parent b95095979c
commit 46b39d0dc6

View File

@ -2214,6 +2214,11 @@ acl_find_targets(struct proxy *p)
}
} /* end of args processing */
/* don't try to resolve groups if we're not certain of having
* resolved userlists first.
*/
if (cfgerr)
break;
if (!strcmp(expr->kw->kw, "http_auth_group")) {
/* note: argument resolved above thanks to ARGT_USR */