]> git.kaiwu.me - haproxy.git/commit
MEDIUM: http/hardening: implement hardening "reject-ctl-in-header-trailer"
authorWilly Tarreau <w@1wt.eu>
Wed, 4 Nov 2026 12:22:26 +0000 (13:22 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 4 Nov 2026 21:45:33 +0000 (22:45 +0100)
commitddf14a89afad6c767d716b81b6f7f940d866dc35
tree6b293a4d486d0c6688ca26daa14e1bbdc868525a
parent1665f7f9cefbf5efdef74808073abd8c618f6b54
MEDIUM: http/hardening: implement hardening "reject-ctl-in-header-trailer"

Rejects requests and responses which contain control characters in
their header or trailer field values (codes 0-8,10-31,127). These ones
are forbidden but have long experienced a certain tolerance among
implementations, which has encouraged some rare applications to use
them as record delimiters for example. No standard component produces
them on the public internet, except attacks. By default, HAProxy only
blocks the strictly required ones (0,10,13) and lets other ones pass,
which can make certain backend applications trigger connection errors.
As such, it is both safe and recommended to block them on public facing
listeners. See also the has_ctl() converter used for detecting them.
doc/configuration.txt
include/haproxy/http-t.h
include/haproxy/http.h
src/h1.c
src/http.c