]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: http/hardening: don't count unregistered hdr/tlr too early
authorWilly Tarreau <w@1wt.eu>
Thu, 5 Nov 2026 07:51:27 +0000 (08:51 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 5 Nov 2026 16:03:24 +0000 (17:03 +0100)
commitaecaefcb1e62ad32bacbbd62bf9d5a91061fb8f0
tree9f5f18721bd8dac0cee8b1a2a8565f44d141b4f8
parenta124f2089973cf6c0abd8aff5fd09131252085ac
BUG/MINOR: http/hardening: don't count unregistered hdr/tlr too early

In 3.5-dev11, the ability to remove unregistered headers and trailers
(X-*) was added with commits 4b9b6044b2 ("MINOR: http/hardening: add
"delete-unregistered-header-fields"") and b5fd464f0a ("MINOR:
http/hardening: add "delete-unregistered-trailer-fields""). There is
a small mistake there, which is the the http_harden() call is made
before checking if the situation was met, resulting in the flags being
set for each header/trailer. For now this doesn't have any impact but
it will when reporting is implemented. Let's fix that by only calling
http_harden() after the header syntax was checked. No backport is
needed.
src/h1.c
src/h2.c
src/h3.c
src/http_htx.c