mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #40261 from nextcloud/backport/40234/stable25
[stable25] enh: skip processing for empty response
This commit is contained in:
commit
41e0fcf80c
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), 0);
|
||||
|
||||
if (empty($targetIps)) {
|
||||
throw new LocalServerException('No DNS record found for ' . $hostName);
|
||||
}
|
||||
|
||||
$curlResolves = [];
|
||||
|
||||
foreach ($ports as $port) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue