]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: http: fix "http-request reject" when not final
authorWilly Tarreau <w@1wt.eu>
Tue, 28 May 2019 06:26:17 +0000 (08:26 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 28 May 2019 06:26:17 +0000 (08:26 +0200)
commit11c90fbd92cfaa5695e328481402d62d536456ef
treef536c5979b71364594fea441da9bd517af4a2242
parent39744f792d5e082738dff5b421b7cc7615ffc4db
BUG/MEDIUM: http: fix "http-request reject" when not final

When "http-request reject" was introduced in 1.8 with commit 53275e8b0
("MINOR: http: implement the "http-request reject" rule"), it was already
broken. The code mentions "it always returns ACT_RET_STOP" and obviously
a gross copy-paste made it ACT_RET_CONT. If the rule is the last one it
properly blocks, but if not the last one it gets ignored, as can be seen
with this simple configuration :

    frontend f1
        bind :8011
        mode http
        http-request reject
        http-request redirect location /

This trivial fix must be backported to 1.9 and 1.8. It is tracked by
github issue #107.
src/http_act.c