-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
Symfony version(s) affected
5.3
Description
Symfony HttpClient supports IDN but does not provide the right flags to the intl IDN methods (idn_to_ascii
and idn_to_utf8
) to be fully IDNA 2008 compliant (RFC 5891).
For example, fußball.test
should be converted as xn--fuball-cta.test
instead of fussball.test
.
See the affected line for conversion to ASCII.
How to reproduce
$client = HttpClient::create();
$response = $client->request('GET', $url);
If $url
is fußball.test
it should make a query to xn--fuball-cta.test
instead of fussball.test
.
Possible Solution
The following flags should be provided to be the most compliant possible with IDNA 2008:
IDNA_DEFAULT | IDNA_USE_STD3_RULES | IDNA_CHECK_BIDI | IDNA_CHECK_CONTEXTJ | IDNA_NONTRANSITIONAL_TO_ASCII