From: VVelox Date: Sun, 3 Jun 2018 09:29:06 +0000 (-0500) Subject: a domain name is unlikely to be both a CNAME and A record X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ea64ec21acfdbc8867977dc135a24ea03a3133dc;p=friendica.git a domain name is unlikely to be both a CNAME and A record --- diff --git a/src/Util/Network.php b/src/Util/Network.php index c1ea6e3547..2bc2203dd2 100644 --- a/src/Util/Network.php +++ b/src/Util/Network.php @@ -492,7 +492,10 @@ class Network $h = substr($addr, strpos($addr, '@') + 1); - if (($h) && (dns_get_record($h, DNS_A + DNS_CNAME + DNS_MX) || filter_var($h, FILTER_VALIDATE_IP) )) { + if (($h) && (dns_get_record($h, DNS_A + DNS_MX) || filter_var($h, FILTER_VALIDATE_IP) )) { + return true; + } + if (($h) && (dns_get_record($h, DNS_CNAME + DNS_MX) || filter_var($h, FILTER_VALIDATE_IP) )) { return true; } return false;