mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-15 20:39:44 -04:00
[MINOR] acl: don't report valid acls as potential mistakes
Commit404e8ab461introduced smart checking for stupid acl typos. However, now haproxy shows the warning even for valid acls, like this one: acl Cookie-X-NoAccel hdr_reg(cookie) (^|\ |;)X-NoAccel=1(;|$) (cherry picked from commit4cdd8314e9)
This commit is contained in:
parent
5bf03c33fd
commit
59dd3fc338
1 changed files with 1 additions and 1 deletions
|
|
@ -766,7 +766,7 @@ struct acl *parse_acl(const char **args, struct list *known_acl)
|
|||
* subject, as this is almost certainly a typo. Right now we can only
|
||||
* emit a warning, so let's do so.
|
||||
*/
|
||||
if (*args[2] == '(')
|
||||
if (!strchr(args[1], '(') && *args[2] == '(')
|
||||
Warning("parsing acl '%s' :\n"
|
||||
" matching '%s' for pattern '%s' is likely a mistake and probably\n"
|
||||
" not what you want. Maybe you need to remove the extraneous space before '('.\n"
|
||||
|
|
|
|||
Loading…
Reference in a new issue