diff --git a/lib/private/Http/Client/DnsPinMiddleware.php b/lib/private/Http/Client/DnsPinMiddleware.php index f5e6214a4ab..9a19bd5830e 100644 --- a/lib/private/Http/Client/DnsPinMiddleware.php +++ b/lib/private/Http/Client/DnsPinMiddleware.php @@ -125,7 +125,7 @@ class DnsPinMiddleware { $ports[] = (string)$port; } - $targetIps = $this->dnsResolve(idn_to_utf8($hostName), 0); + $targetIps = $this->dnsResolve(idn_to_utf8($hostName, IDNA_DEFAULT, INTL_IDNA_VARIANT_UTS46), 0); $curlResolves = []; diff --git a/lib/private/Http/Client/LocalAddressChecker.php b/lib/private/Http/Client/LocalAddressChecker.php index 2b91dbfdb9d..c85b18eb8bd 100644 --- a/lib/private/Http/Client/LocalAddressChecker.php +++ b/lib/private/Http/Client/LocalAddressChecker.php @@ -78,7 +78,7 @@ class LocalAddressChecker { throw new LocalServerException('Could not detect any host'); } - $host = idn_to_utf8(strtolower(urldecode($host))); + $host = idn_to_utf8(strtolower(urldecode($host)), IDNA_DEFAULT, INTL_IDNA_VARIANT_UTS46); // Remove brackets from IPv6 addresses if (strpos($host, '[') === 0 && substr($host, -1) === ']') { $host = substr($host, 1, -1);