valid host checks were returning true on TXT records and other useless garbage
This commit is contained in:
parent
b381dfa6c6
commit
0fb3aa1b57
4
boot.php
4
boot.php
|
@ -1481,7 +1481,7 @@ function validate_url(&$url) {
|
||||||
$url = 'http://' . $url;
|
$url = 'http://' . $url;
|
||||||
$h = parse_url($url);
|
$h = parse_url($url);
|
||||||
|
|
||||||
if(($h) && (checkdnsrr($h['host'], 'ANY'))) {
|
if(($h) && (dns_get_record($h['host'], DNS_A + DNS_CNAME + DNS_PTR))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -1496,7 +1496,7 @@ function validate_email($addr) {
|
||||||
return false;
|
return false;
|
||||||
$h = substr($addr,strpos($addr,'@') + 1);
|
$h = substr($addr,strpos($addr,'@') + 1);
|
||||||
|
|
||||||
if(($h) && (checkdnsrr($h, 'ANY'))) {
|
if(($h) && (dns_get_record($h['host'], DNS_A + DNS_CNAME + DNS_PTR + DNS_MX))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user