From 5476e0b6d6944c7733439d6e73e14170b605c28c Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Wed, 22 May 2024 08:23:44 +0200 Subject: [PATCH] fix(autoconfig): Disable bugy DNS query Signed-off-by: Christoph Wurst --- lib/Service/AutoConfig/IspDb.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/Service/AutoConfig/IspDb.php b/lib/Service/AutoConfig/IspDb.php index 53c601266a..e058c947c4 100644 --- a/lib/Service/AutoConfig/IspDb.php +++ b/lib/Service/AutoConfig/IspDb.php @@ -50,7 +50,8 @@ public function getUrls(): array { ]; } - public function __construct(IClientService $clientService, LoggerInterface $logger) { + public function __construct(IClientService $clientService, + LoggerInterface $logger) { $this->client = $clientService->newClient(); $this->logger = $logger; } @@ -119,10 +120,9 @@ private function convertServerElement(\SimpleXMLElement $server): array { /** * @param string $domain - * @param bool $tryMx * @return array */ - public function query(string $domain, string $email, bool $tryMx = true): array { + public function query(string $domain, string $email): array { $this->logger->debug("IsbDb: querying <$domain>"); if (strpos($domain, '@') !== false) { // TODO: use horde mail address parsing instead @@ -149,14 +149,6 @@ public function query(string $domain, string $email, bool $tryMx = true): array } } } - - if ($tryMx && ($dns = dns_get_record($domain, DNS_MX))) { - $domain = $dns[0]['target']; - if (!($provider = $this->query($domain, $email, false))) { - [, $domain] = explode('.', $domain, 2); - $provider = $this->query($domain, $email, false); - } - } return $provider; } }