]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: h1: reject CONNECT authorities with an empty host
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 7 Oct 2026 14:04:50 +0000 (16:04 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 16 Oct 2026 17:10:27 +0000 (19:10 +0200)
commit62bde6048d8fa60d24277659833866ad82f0dace
tree7bf04e585b628c659530b9b207e295c787a8f4d7
parentfcbdb34e38708871c7a1aa2758ad6a1dc34a1d41
BUG/MINOR: h1: reject CONNECT authorities with an empty host

h1_validate_connect_authority() checks that the authority of a CONNECT
request contains a non-empty port, but it doesn't check the host part. So
"CONNECT :443 HTTP/1.1" was accepted and forwarded with or without a Host
header, and with "Host: :443" the Host header was even normalized to an
empty value. Such a target is invalid (RFC9112#3.2.3 requires a
uri-host). Let's reject it.

This was introduced by commit 3f5fbe940 ("BUG/MEDIUM: h1: Improve authority
validation for CONNCET request") in 2.7. It should be backported as far as
2.8.
reg-tests/http-messaging/h1_connect_no_host_no_body.vtc
src/h1.c