[php-src] PR #25870: Fix GH-25869: UrlBuilder::setHost() accepts forbidden host code points
| From: | lazerg | Date: | Sat, 28 Nov 2026 11:39:33 +0000 |
| Subject: | [php-src] PR #25870: Fix GH-25869: UrlBuilder::setHost() accepts forbidden host code points | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-41153@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/25870
Author: lazerg
Uri\WhatWg\UrlBuilder::setHost() only rejected the /, ?,
# and \ delimiters, so a host like "\0bébé.be"
was accepted and the error only showed up later in build(). The other forbidden host
code points (NUL, space, <, >, @, ^,
|) are rejected by both the domain and the opaque host parser, so the host can never be
valid whatever the scheme is. setHost() now throws for them right away, like
Uri\Rfc3986\UriBuilder::setHost() does.
Fixes #25869