]> git.kaiwu.me - haproxy.git/commit
BUG/MAJOR: mux-h2: split absolute URIs like the HTTP analysers do on output
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 7 Oct 2026 09:18:12 +0000 (11:18 +0200)
committerOlivier Houchard <cognet@ci0.org>
Mon, 19 Oct 2026 18:56:23 +0000 (20:56 +0200)
commit6982230035aa12260c945fe0fb5aa3e7998b33a0
treeeb5f94d46a3a9201f108930cf2be163371812703
parent19910335dc7513fdf2896c42f0d5a6283a7ab6f2
BUG/MAJOR: mux-h2: split absolute URIs like the HTTP analysers do on output

When deriving :authority and :path from an absolute-form URI, the
authority ended at the first '/' only instead of the first '/', '?' or
'#' (RFC3986#3.2), and the userinfo was stripped up to the first '@'
instead of the last one. The analysers and sample fetches rely on
http_parse_authority() which does it correctly, so a request could be
evaluated for one host/path and delivered to the H2 server with
another one, bypassing host and path based rules.

Now the authority is extracted like http_parse_authority() does, and a
'/' is prepended to :path when needed.

This exists since commit b8ce8905c ("MEDIUM: mux-h2: do not map Host to
:authority on output") in 2.1, the userinfo part since 29fa2667a
("BUG/MINOR: mux-h2: strip the userinfo when deriving :authority for a
server") in 3.5-dev5. Must be backported to all stable versions (the
userinfo part only where 29fa2667a was backported).
src/mux_h2.c