diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-09-20 13:20:35 +0300 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-09-20 13:20:35 +0300 |
commit | a907b74c2ac40a6d12976056cbc21eab09312936 (patch) | |
tree | 0fe58eb996b01bcc1e35b97baf61920b85137bf0 /lib/private | |
parent | c083f77e4e88c14ea2515440aae40234ee35ce0a (diff) |
Add missing urldecode and idn_to_utf8 calls to local address checker
The call to idn_to_utf8 call is actually to apply normalization
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Http/Client/DnsPinMiddleware.php | 2 | ||||
-rw-r--r-- | lib/private/Http/Client/LocalAddressChecker.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Http/Client/DnsPinMiddleware.php b/lib/private/Http/Client/DnsPinMiddleware.php index ee0ea053dcf..f5e6214a4ab 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($hostName, 0); + $targetIps = $this->dnsResolve(idn_to_utf8($hostName), 0); $curlResolves = []; diff --git a/lib/private/Http/Client/LocalAddressChecker.php b/lib/private/Http/Client/LocalAddressChecker.php index f4fea503ab9..b0de54b430f 100644 --- a/lib/private/Http/Client/LocalAddressChecker.php +++ b/lib/private/Http/Client/LocalAddressChecker.php @@ -72,7 +72,7 @@ class LocalAddressChecker { throw new LocalServerException('Could not detect any host'); } - $host = strtolower($host); + $host = idn_to_utf8(strtolower(urldecode($host))); // Remove brackets from IPv6 addresses if (strpos($host, '[') === 0 && substr($host, -1) === ']') { $host = substr($host, 1, -1); |