]> git.mxchange.org Git - friendica.git/commitdiff
a domain name is unlikely to be both a CNAME and A record
authorVVelox <vvelox@vvelox.net>
Sun, 3 Jun 2018 09:29:06 +0000 (04:29 -0500)
committerGitHub <noreply@github.com>
Sun, 3 Jun 2018 09:29:06 +0000 (04:29 -0500)
src/Util/Network.php

index c1ea6e354765c7d2da1fffbaaf38e0c0aaca34eb..2bc2203dd27faec8c869a0681b9d2c768dac89c8 100644 (file)
@@ -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;