From ea64ec21acfdbc8867977dc135a24ea03a3133dc Mon Sep 17 00:00:00 2001 From: VVelox Date: Sun, 3 Jun 2018 04:29:06 -0500 Subject: [PATCH] a domain name is unlikely to be both a CNAME and A record --- src/Util/Network.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Util/Network.php b/src/Util/Network.php index c1ea6e354..2bc2203dd 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;