Merge pull request #5167 from VVelox/develop

a domain name is unlikely to be both a CNAME and A record
This commit is contained in:
Hypolite Petovan 2018-06-26 08:05:34 -04:00 committed by GitHub
commit e3584daef9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -492,7 +492,10 @@ class Network
$h = substr($addr, strpos($addr, '@') + 1); $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)) {
return true; return true;
} }
return false; return false;