]> git.kaiwu.me - haproxy.git/commit
MINOR: http/hardening: implement hardening "reject-header-trailer-folding"
authorWilly Tarreau <w@1wt.eu>
Tue, 3 Nov 2026 15:52:07 +0000 (16:52 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 4 Nov 2026 21:45:33 +0000 (22:45 +0100)
commit34200a02567a4cf975ed63aabe8f412696218e6f
tree9fc029a6ae4998b2c346bae08f359a22bf0bc9da
parentcb652df4bda3eb7cd099867a00540a0e6c3be3f3
MINOR: http/hardening: implement hardening "reject-header-trailer-folding"

Rejects requests and responses which contain folded header fields or
trailer fields. Folding consists in having a single field span multiple
lines. This practice is obsoleted by modern HTTP standards, absolutely
not seen anymore in valid messages over the internet but might still be
present in a few antique internal services dealing with large cookies.
On untrusted networks, they are always associated with attacks trying
to inject headers into non-compliant components, and should be rejected
as a sign of break-in attempt. Note that HAProxy does not have problems
with them and systematically unfolds these messages before forwarding
them.
doc/configuration.txt
include/haproxy/http-t.h
src/h1.c
src/http.c