From 0fb3aa1b57dc2a1d58a839bc99d2098003778d33 Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 2 Jan 2011 19:05:11 -0800 Subject: valid host checks were returning true on TXT records and other useless garbage --- boot.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index 197b6d238..e4a13ce92 100644 --- a/boot.php +++ b/boot.php @@ -1481,7 +1481,7 @@ function validate_url(&$url) { $url = 'http://' . $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 false; @@ -1496,7 +1496,7 @@ function validate_email($addr) { return false; $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 false; -- cgit v1.2.3