From b6c6475e188b38c458cca47d6a7378df24f186fb Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Mon, 4 Sep 2023 15:18:37 +0200 Subject: enh: skip processing for empty response Signed-off-by: Daniel Kesselberg --- lib/private/Http/Client/DnsPinMiddleware.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/private/Http/Client/DnsPinMiddleware.php b/lib/private/Http/Client/DnsPinMiddleware.php index c6a58972fdd..5bde20d5cc1 100644 --- a/lib/private/Http/Client/DnsPinMiddleware.php +++ b/lib/private/Http/Client/DnsPinMiddleware.php @@ -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) { -- cgit v1.2.3