diff options
author | marijus <mario@localhost.localdomain> | 2014-02-07 13:50:18 +0100 |
---|---|---|
committer | marijus <mario@localhost.localdomain> | 2014-02-07 13:50:18 +0100 |
commit | 6dd05bb53fb7892a386740f6ee246649f6f70e1e (patch) | |
tree | cb959c7969402bcc3a70acfb5088ec34f43402f5 /include/zot.php | |
parent | 6f2c168d1a434b2223f09a922780617fdc07b278 (diff) | |
parent | c80325b4279b6f19540416064382755ca5e6eccd (diff) | |
download | volse-hubzilla-6dd05bb53fb7892a386740f6ee246649f6f70e1e.tar.gz volse-hubzilla-6dd05bb53fb7892a386740f6ee246649f6f70e1e.tar.bz2 volse-hubzilla-6dd05bb53fb7892a386740f6ee246649f6f70e1e.zip |
Merge branch 'master' of https://github.com/friendica/red into upstream
Diffstat (limited to 'include/zot.php')
-rw-r--r-- | include/zot.php | 11 |
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); |