aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-01-02 19:05:11 -0800
committerFriendika <info@friendika.com>2011-01-02 19:05:11 -0800
commit0fb3aa1b57dc2a1d58a839bc99d2098003778d33 (patch)
tree26ff418284db45d6bccd1e2a30a9bf88270e6b8c
parentb381dfa6c64719099c9f07c746f2ce9370d3a37a (diff)
downloadvolse-hubzilla-0fb3aa1b57dc2a1d58a839bc99d2098003778d33.tar.gz
volse-hubzilla-0fb3aa1b57dc2a1d58a839bc99d2098003778d33.tar.bz2
volse-hubzilla-0fb3aa1b57dc2a1d58a839bc99d2098003778d33.zip
valid host checks were returning true on TXT records and other useless garbage
-rw-r--r--boot.php4
-rw-r--r--index.php1
2 files changed, 3 insertions, 2 deletions
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;
diff --git a/index.php b/index.php
index f6ea0c9a8..abc02521a 100644
--- 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");