aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-02-07 00:50:04 -0800
committerfriendica <info@friendica.com>2014-02-07 00:50:04 -0800
commit14fd940e08e02f1f2b244dfa6751f9778284235b (patch)
tree014b39cb67c25394b16ba0566f2d1f18d34a029d /include/zot.php
parentfb49647993fec8f52e69801ce92a9882a4c95b1a (diff)
downloadvolse-hubzilla-14fd940e08e02f1f2b244dfa6751f9778284235b.tar.gz
volse-hubzilla-14fd940e08e02f1f2b244dfa6751f9778284235b.tar.bz2
volse-hubzilla-14fd940e08e02f1f2b244dfa6751f9778284235b.zip
To be listed as a public site, you need to be an https site with a valid cert. If you don't make the cut, you will either not be listed as a public site or you will be de-listed. Period. This is non-negotiable.
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/zot.php b/include/zot.php
index 7c2cfe019..b7a22a099 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -1873,6 +1873,17 @@ function import_site($arr,$pubkey) {
$access_policy = ACCESS_TIERED;
}
+ // don't let insecure sites register as public hubs
+
+ if(strpos($arr['url'],'https://') === false)
+ $access_policy = ACCESS_PRIVATE;
+
+ if($access_policy != ACCESS_PRIVATE) {
+ $x = z_fetch_url($arr['url'] . '/siteinfo/json');
+ if(! $x['success'])
+ $access_policy = ACCESS_PRIVATE;
+ }
+
$directory_url = htmlspecialchars($arr['directory_url'],ENT_COMPAT,'UTF-8',false);
$url = htmlspecialchars($arr['url'],ENT_COMPAT,'UTF-8',false);
$sellpage = htmlspecialchars($arr['sellpage'],ENT_COMPAT,'UTF-8',false);