]> git.kaiwu.me - haproxy.git/commit
BUG/MAJOR: http: forbid comma character in authority value
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 28 Apr 2026 07:37:34 +0000 (09:37 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 29 Apr 2026 08:03:39 +0000 (10:03 +0200)
commitb743b566b4215ed49b95d2fc22054ffe66202a0f
treef5b0e59e4012489597ab4a1fe74eefc30b909414
parentdd92232012d6184bbb76a7f419cdf4a434822229
BUG/MAJOR: http: forbid comma character in authority value

Strictly speaking, the comma character in authority is allowed by RFC3986.
However, it is pretty ambiguous for Host header value because comma is also
the value separator for headers supporting multiple value. It is also very
unlikely to have comma in host header value or authority. So instead of
dealing with this case with all the risks of bugs that this entails, we've
decided to forbid the comma in authority and host header value during the
parsing. Concretely, only http_authority_has_forbidden_char() was updated.

The internal API was not updated to prevent comma to be inserted when the
host header value is updated for instance. But this should be so uncommon
that it is not really a concern.

This patch should be backported as far as 2.8. For previous verions,
http_authority_has_forbidden_char() function does not exist.
include/haproxy/http.h