]> git.kaiwu.me - haproxy.git/commit
DOC: configuration: add a section on secure filtering of HTTP requests
authorWilly Tarreau <w@1wt.eu>
Wed, 11 Nov 2026 12:36:57 +0000 (12:36 +0000)
committerWilly Tarreau <w@1wt.eu>
Thu, 12 Nov 2026 17:12:23 +0000 (18:12 +0100)
commit742af3e70bb6781c831728dd40378db780ed8229
tree5e9b641cc5294fff80c4635a4fa2e48904329080
parent26c4f8604d52022c045631d3263bf23bfa99e5e6
DOC: configuration: add a section on secure filtering of HTTP requests

Deny rules matching a path, an URL or a query string are regularly
reported as bypassable using alternate encodings or aliases (case,
repeated slashes, "." and ".." segments, %-encoding, "%u" encoding,
backslashes, path parameters etc). This is expected: HTTP has many
aliases and which ones apply depends on what is behind haproxy, so no
normalization performed here can be correct in the general case.

The only reliable approach is an allow-list: accept what is explicitly
recognized and reject everything else. Let's document this in a new
section 7.5, starting with a table of aliases of a trivially denied path
to make the problem obvious, explain why it cannot be solved by code,
show how to write allow-list rules with "deny unless" or with a variable
set by each accepting rule and checked once at the end, and list the
patterns worth spotting when reviewing a configuration.

Link: https://www.mail-archive.com/haproxy@formilux.org/msg37732.html
doc/configuration.txt