mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
Merge pull request #40264 from nextcloud/backport/40234/stable23
[stable23] enh: skip processing for empty response
This commit is contained in:
commit
5648713895
1 changed files with 5 additions and 0 deletions
|
|
@ -25,6 +25,7 @@ declare(strict_types=1);
|
|||
*/
|
||||
namespace OC\Http\Client;
|
||||
|
||||
use OCP\Http\Client\LocalServerException;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
|
||||
class DnsPinMiddleware {
|
||||
|
|
@ -127,6 +128,10 @@ class DnsPinMiddleware {
|
|||
|
||||
$targetIps = $this->dnsResolve(idn_to_utf8($hostName, IDNA_DEFAULT, INTL_IDNA_VARIANT_UTS46), 0);
|
||||
|
||||
if (empty($targetIps)) {
|
||||
throw new LocalServerException('No DNS record found for ' . $hostName);
|
||||
}
|
||||
|
||||
$curlResolves = [];
|
||||
|
||||
foreach ($ports as $port) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue