mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
Pass default values to idn_to_utf8 to fix behavior under PHP 7.3
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
8360bb8620
commit
6bdb5d2804
2 changed files with 2 additions and 2 deletions
|
|
@ -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 = [];
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue