]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: map/acl: fix unwanted flags inheritance.
authorEmeric Brun <ebrun@haproxy.com>
Mon, 3 Jul 2017 15:54:23 +0000 (17:54 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 4 Jul 2017 08:45:53 +0000 (10:45 +0200)
commit7d27f3c12d2aaa3514cdd02ed94ce4421c32fd6d
treeb22506b17d57f9922a6ba40701c4a2896347a553
parente0ee0be4e74af11f47a7bcf0b1e8cfd0e3092b2a
BUG/MEDIUM: map/acl: fix unwanted flags inheritance.

The bug: Maps/ACLs using the same file/id can mistakenly inherit
their flags from the last declared one.

i.e.

    $ cat haproxy.conf
    listen mylistener
mode http
bind 0.0.0.0:8080

acl myacl1 url -i -f mine.acl
acl myacl2 url -f mine.acl
acl myacl3 url -i -f mine.acl
redirect location / if myacl2
    $ cat mine.acl
    foobar

Shows an unexpected redirect for request 'GET /FOObAR HTTP/1.0\n\n'.

This fix should be backported on mainline branches v1.6 and v1.7.
include/proto/pattern.h
src/acl.c
src/pattern.c