]> git.mxchange.org Git - friendica.git/commitdiff
valid host checks were returning true on TXT records and other useless garbage
authorFriendika <info@friendika.com>
Mon, 3 Jan 2011 03:05:11 +0000 (19:05 -0800)
committerFriendika <info@friendika.com>
Mon, 3 Jan 2011 03:05:11 +0000 (19:05 -0800)
boot.php
index.php

index 197b6d2381c98c9dd8927379f068d138f05b67c2..e4a13ce92cefd219bf09f7be3dbf7e8bcbdf2aba 100644 (file)
--- 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;
index f6ea0c9a80b78f8055ff123b1f51b50ee1f1db76..abc02521a2ccfec896cfc83922bdd8c193ad1eef 100644 (file)
--- a/index.php
+++ b/index.php
@@ -127,6 +127,7 @@ else
  * further processing.
  */
 
+
 if(strlen($a->module)) {
        if(file_exists("mod/{$a->module}.php")) {
                include("mod/{$a->module}.php");