[BUGFIX] Network: Remove URL/domain DNS_PTR checks

This commit is contained in:
Marcus Müller 2018-04-12 19:28:52 +02:00 committed by GitHub
parent 33d60efd8e
commit f9c34fee5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -446,7 +446,7 @@ class Network
/// @TODO Really suppress function outcomes? Why not find them + debug them? /// @TODO Really suppress function outcomes? Why not find them + debug them?
$h = @parse_url($url); $h = @parse_url($url);
if ((is_array($h)) && (@dns_get_record($h['host'], DNS_A + DNS_CNAME + DNS_PTR) || filter_var($h['host'], FILTER_VALIDATE_IP) )) { if ((is_array($h)) && (@dns_get_record($h['host'], DNS_A + DNS_CNAME) || filter_var($h['host'], FILTER_VALIDATE_IP) )) {
return $url; return $url;
} }
@ -471,7 +471,7 @@ 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_PTR + DNS_MX) || filter_var($h, FILTER_VALIDATE_IP) )) { if (($h) && (dns_get_record($h, DNS_A + DNS_CNAME + DNS_MX) || filter_var($h, FILTER_VALIDATE_IP) )) {
return true; return true;
} }
return false; return false;