aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Well_known.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-05-27 08:19:22 +0000
committerMario <mario@mariovavti.com>2021-05-27 08:19:22 +0000
commit43ef82aaaa78cf5b11325183d1a05af1e6888fd0 (patch)
tree2c965c2d2dc9d3a08c77e44143c53b5f2d57edd8 /Zotlabs/Module/Well_known.php
parent7171d790f46e48f1cd7c1d7fe638610faab86b82 (diff)
downloadvolse-hubzilla-43ef82aaaa78cf5b11325183d1a05af1e6888fd0.tar.gz
volse-hubzilla-43ef82aaaa78cf5b11325183d1a05af1e6888fd0.tar.bz2
volse-hubzilla-43ef82aaaa78cf5b11325183d1a05af1e6888fd0.zip
remove zfinger
Diffstat (limited to 'Zotlabs/Module/Well_known.php')
-rw-r--r--Zotlabs/Module/Well_known.php36
1 files changed, 14 insertions, 22 deletions
diff --git a/Zotlabs/Module/Well_known.php b/Zotlabs/Module/Well_known.php
index 0d7b222b8..af59b76e0 100644
--- a/Zotlabs/Module/Well_known.php
+++ b/Zotlabs/Module/Well_known.php
@@ -5,36 +5,28 @@ namespace Zotlabs\Module;
class Well_known extends \Zotlabs\Web\Controller {
function init(){
-
+
if(argc() > 1) {
-
+
$arr = array('server' => $_SERVER, 'request' => $_REQUEST);
call_hooks('well_known', $arr);
-
-
+
+
if(! check_siteallowed($_SERVER['REMOTE_ADDR'])) {
logger('well_known: site not allowed. ' . $_SERVER['REMOTE_ADDR']);
killme();
}
-
+
// from php.net re: REMOTE_HOST:
- // Note: Your web server must be configured to create this variable. For example in Apache
- // you'll need HostnameLookups On inside httpd.conf for it to exist. See also gethostbyaddr().
-
+ // Note: Your web server must be configured to create this variable. For example in Apache
+ // you'll need HostnameLookups On inside httpd.conf for it to exist. See also gethostbyaddr().
+
if(get_config('system','siteallowed_remote_host') && (! check_siteallowed($_SERVER['REMOTE_HOST']))) {
logger('well_known: site not allowed. ' . $_SERVER['REMOTE_HOST']);
killme();
}
-
+
switch(argv(1)) {
- case 'zot-info':
- \App::$argc -= 1;
- array_shift(\App::$argv);
- \App::$argv[0] = 'zfinger';
- $module = new \Zotlabs\Module\Zfinger();
- $module->init();
- break;
-
case 'webfinger':
\App::$argc -= 1;
array_shift(\App::$argv);
@@ -42,7 +34,7 @@ class Well_known extends \Zotlabs\Web\Controller {
$module = new \Zotlabs\Module\Wfinger();
$module->init();
break;
-
+
case 'host-meta':
\App::$argc -= 1;
array_shift(\App::$argv);
@@ -63,7 +55,7 @@ class Well_known extends \Zotlabs\Web\Controller {
case 'dnt-policy.txt':
echo file_get_contents('doc/dnt-policy.txt');
killme();
-
+
case 'caldav':
case 'carddav':
if ($_SERVER['REQUEST_METHOD'] == 'PROPFIND') {
@@ -73,16 +65,16 @@ class Well_known extends \Zotlabs\Web\Controller {
default:
if(file_exists(\App::$cmd)) {
- echo file_get_contents(\App::$cmd);
+ echo file_get_contents(\App::$cmd);
killme();
}
elseif(file_exists(\App::$cmd . '.php'))
require_once(\App::$cmd . '.php');
break;
-
+
}
}
-
+
http_status_exit(404);
}
}