From d8161e6fe26488232d84d806487581cdfab8d0d3 Mon Sep 17 00:00:00 2001 From: Sebastian Marsching Date: Thu, 12 Oct 2023 21:47:29 +0200 Subject: [PATCH] Make DNS lookups fail gracefully. --- data/web/autoconfig.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/data/web/autoconfig.php b/data/web/autoconfig.php index fdf70a77b..901a245d6 100644 --- a/data/web/autoconfig.php +++ b/data/web/autoconfig.php @@ -24,10 +24,10 @@ else { } if (isset($_GET['emailaddress'])) { - $emailaddress_at = strpos($_GET['emailaddress'], '@'); - if ($emailaddress_at !== FALSE) { - $domain = substr($_GET['emailaddress'], $emailaddress_at + 1); - } + $emailaddress_at = strpos($_GET['emailaddress'], '@'); + if ($emailaddress_at !== FALSE) { + $domain = substr($_GET['emailaddress'], $emailaddress_at + 1); + } } header('Content-Type: application/xml'); @@ -56,7 +56,7 @@ header('Content-Type: application/xml'); +if ($records === FALSE || count($records) == 0 || $records[0]['target'] != '') { ?> @@ -67,7 +67,7 @@ if (count($records) == 0 || $records[0]['target'] != '') { ?> +if ($records === FALSE || count($records) == 0 || $records[0]['target'] != '') { ?>