Skip to content

Commit

Permalink
Merge pull request #40261 from nextcloud/backport/40234/stable25
Browse files Browse the repository at this point in the history
[stable25] enh: skip processing for empty response
  • Loading branch information
blizzz committed Sep 5, 2023
2 parents cb607b5 + 07ab666 commit 41e0fcf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/private/Http/Client/DnsPinMiddleware.php
Expand Up @@ -25,6 +25,7 @@
*/
namespace OC\Http\Client;

use OCP\Http\Client\LocalServerException;
use Psr\Http\Message\RequestInterface;

class DnsPinMiddleware {
Expand Down Expand Up @@ -127,6 +128,10 @@ public function addDnsPinning() {

$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) {
Expand Down

0 comments on commit 41e0fcf

Please sign in to comment.