aboutsummaryrefslogtreecommitdiffstats
path: root/include/network.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-04-13 06:02:18 -0700
committerfriendica <info@friendica.com>2012-04-13 06:02:18 -0700
commit11ba88b6d21a40c302d21646dfa9366bb393931d (patch)
treefeddc7956054f7966e2f4ebd4231df20e9e31fee /include/network.php
parentdf1904b204a969780609cac64bbb1a03a8dd3fcb (diff)
parentf6e1ddf7fbcc122f5122336650e1cfaa71aed8e3 (diff)
downloadvolse-hubzilla-11ba88b6d21a40c302d21646dfa9366bb393931d.tar.gz
volse-hubzilla-11ba88b6d21a40c302d21646dfa9366bb393931d.tar.bz2
volse-hubzilla-11ba88b6d21a40c302d21646dfa9366bb393931d.zip
Merge pull request #230 from fabrixxm/master
some work, mainly on quattro
Diffstat (limited to 'include/network.php')
-rw-r--r--include/network.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/network.php b/include/network.php
index 23ef50b21..8c678a443 100644
--- a/include/network.php
+++ b/include/network.php
@@ -587,13 +587,14 @@ function fetch_xrd_links($url) {
if(! function_exists('validate_url')) {
function validate_url(&$url) {
- // no naked subdomains
- if(strpos($url,'.') === false)
+
+ // no naked subdomains (allow localhost for tests)
+ if(strpos($url,'.') === false && strpos($url,'/localhost/') === false)
return false;
if(substr($url,0,4) != 'http')
$url = 'http://' . $url;
$h = @parse_url($url);
-
+
if(($h) && (dns_get_record($h['host'], DNS_A + DNS_CNAME + DNS_PTR))) {
return true;
}