diff --git a/.env b/.env index 28d1799a59..666e1bb92e 100644 --- a/.env +++ b/.env @@ -21,7 +21,7 @@ _APP_OPTIONS_ROUTER_PROTECTION=disabled _APP_OPTIONS_FORCE_HTTPS=disabled _APP_OPTIONS_ROUTER_FORCE_HTTPS=disabled _APP_OPENSSL_KEY_V1=your-secret-key -_APP_DNS=8.8.8.8,1.1.1.1 +_APP_DNS=8.8.8.8,1.1.1.1 _APP_DOMAIN=traefik _APP_CONSOLE_DOMAIN=localhost _APP_DOMAIN_FUNCTIONS=functions.localhost diff --git a/src/Appwrite/Network/Validator/DNS.php b/src/Appwrite/Network/Validator/DNS.php index af8b064689..cc30ec2246 100644 --- a/src/Appwrite/Network/Validator/DNS.php +++ b/src/Appwrite/Network/Validator/DNS.php @@ -18,17 +18,15 @@ class DNS extends Validator protected const FAILURE_REASON_INTERNAL = 'Internal error occurred.'; protected const FAILURE_REASON_UNKNOWN = ''; - protected static string $regionVerbose = ''; // Useful when overriding in multi-region environments - /** * @var mixed */ - protected mixed $logs; + protected mixed $logs = []; /** * @var array */ - protected array $dnsServers; + protected array $dnsServers = []; protected string $domain = ''; protected string $resolver = ''; @@ -61,13 +59,7 @@ class DNS extends Validator $messages = []; - $region = self::$regionVerbose; - - if (!empty($region)) { - $messages[] = "Verification of DNS records failed with DNS resolver {$this->resolver} in {$region} region"; - } else { - $messages[] = "Verification of DNS records failed with DNS resolver {$this->resolver}"; - } + $messages[] = "Verification of DNS records failed with DNS resolver {$this->resolver}"; if ($this->count === 0) { $messages[] = 'Domain ' . $this->domain . ' does not have ' . $this->type . ' record'; @@ -169,7 +161,7 @@ class DNS extends Validator \array_shift($parts); $parentDomain = \implode('.', $parts); $validator = new DNS($this->target, DNS::RECORD_CAA, $dnsServer); - return $validator->isValid($parentDomain, $dnsServer); + return $validator->isValidWithDNSServer($parentDomain, $dnsServer); } return false;