]> git.kaiwu.me - haproxy.git/commit
MINOR: http/harderning: implement "delete-underscore-in-header-name"
authorWilly Tarreau <w@1wt.eu>
Tue, 27 Oct 2026 14:53:06 +0000 (15:53 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 4 Nov 2026 21:45:32 +0000 (22:45 +0100)
commitd65f117160cc62b5d0fd92ae50964934ebcbf3d6
tree87390268cccb8ee7722e75d7c72aa280e5fe6943
parentcc0e57965e01c0e9d3c7c9b801aa70cd4cbdfac3
MINOR: http/harderning: implement "delete-underscore-in-header-name"

Deletes from requests and responses any header field whose name
contains an underscore character ('_' or \x5C). While this character is
perfectly permitted, some application frameworks which create automatic
variables already turn the dash ('-') into an underscore in variable
names, leading to an ambiguity with the underscore which can result in
the same variable name. This could be abused to bypass some
access-control policy for example. No standard HTTP header uses this,
so it is recommended to enable on untrusted listeners. Note that this
applies only after "reject-underscore-in-header-name" was accepted.
doc/configuration.txt
include/haproxy/http-t.h
src/h1.c
src/h2.c
src/h3.c
src/http.c