]> source.dussan.org Git - nextcloud-server.git/commitdiff
enh: skip processing for empty response 40258/head
authorDaniel Kesselberg <mail@danielkesselberg.de>
Mon, 4 Sep 2023 13:18:37 +0000 (15:18 +0200)
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>
Mon, 4 Sep 2023 18:51:27 +0000 (18:51 +0000)
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
lib/private/Http/Client/DnsPinMiddleware.php

index c6a58972fdd6563d94e993be9b13ac03c78724cf..5bde20d5cc12b1138234211292ba081f693628c4 100644 (file)
@@ -128,6 +128,10 @@ class DnsPinMiddleware {
 
                                $targetIps = $this->dnsResolve(idn_to_utf8($hostName), 0);
 
+                               if (empty($targetIps)) {
+                                       throw new LocalServerException('No DNS record found for ' . $hostName);
+                               }
+
                                $curlResolves = [];
 
                                foreach ($ports as $port) {