diff options
author | Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com> | 2024-03-26 18:14:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-26 18:14:49 +0100 |
commit | f8d1487dcdd0c9b5f41b1e65447d1ff70dd141d8 (patch) | |
tree | a1270b30ad63c34081e6cc4e6d78db064185dccc /lib | |
parent | 0cb691d07e0a7c84eaf66dfee8a533d1df621f5c (diff) | |
parent | 7e4be1fcfd5f652345848257472b9bfb3285779a (diff) | |
download | nextcloud-server-f8d1487dcdd0c9b5f41b1e65447d1ff70dd141d8.tar.gz nextcloud-server-f8d1487dcdd0c9b5f41b1e65447d1ff70dd141d8.zip |
Merge pull request #44475 from nextcloud/fix/disabled-ipv6
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Http/Client/DnsPinMiddleware.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/Http/Client/DnsPinMiddleware.php b/lib/private/Http/Client/DnsPinMiddleware.php index 518281e4af0..0d2f8d0bdc8 100644 --- a/lib/private/Http/Client/DnsPinMiddleware.php +++ b/lib/private/Http/Client/DnsPinMiddleware.php @@ -75,7 +75,9 @@ class DnsPinMiddleware { $soaDnsEntry = $this->soaRecord($target); $dnsNegativeTtl = $soaDnsEntry['minimum-ttl'] ?? null; - $dnsTypes = [DNS_A, DNS_AAAA, DNS_CNAME]; + $dnsTypes = \defined('AF_INET6') || @inet_pton('::1') + ? [DNS_A, DNS_AAAA, DNS_CNAME] + : [DNS_A, DNS_CNAME]; foreach ($dnsTypes as $dnsType) { if ($this->negativeDnsCache->isNegativeCached($target, $dnsType)) { continue; |