aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Authtest.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2021-07-09 11:31:26 +0200
committerMario Vavti <mario@mariovavti.com>2021-07-09 11:31:26 +0200
commit2dd47a9f596106bfe8ea5d95a5f20597ed8bf0cd (patch)
tree8fd238ebca4b124916eb31a6760bb227b7bb57ba /Zotlabs/Module/Authtest.php
parent6de327402bb90b3f09ccb0c92ffb112755dbd5a0 (diff)
parenta92ad512bbcfc367f17739886cdeada13c20e66a (diff)
downloadvolse-hubzilla-2dd47a9f596106bfe8ea5d95a5f20597ed8bf0cd.tar.gz
volse-hubzilla-2dd47a9f596106bfe8ea5d95a5f20597ed8bf0cd.tar.bz2
volse-hubzilla-2dd47a9f596106bfe8ea5d95a5f20597ed8bf0cd.zip
Merge branch '6.0RC'
Diffstat (limited to 'Zotlabs/Module/Authtest.php')
-rw-r--r--Zotlabs/Module/Authtest.php31
1 files changed, 14 insertions, 17 deletions
diff --git a/Zotlabs/Module/Authtest.php b/Zotlabs/Module/Authtest.php
index 239ae3bdb..d85af09dc 100644
--- a/Zotlabs/Module/Authtest.php
+++ b/Zotlabs/Module/Authtest.php
@@ -1,41 +1,38 @@
<?php
namespace Zotlabs\Module;
-require_once('include/zot.php');
-
-
class Authtest extends \Zotlabs\Web\Controller {
function get() {
-
-
+
+
$auth_success = false;
$o .= '<h3>Magic-Auth Diagnostic</h3>';
-
+
if(! local_channel()) {
notice( t('Permission denied.') . EOL);
return $o;
}
-
+
$o .= '<form action="authtest" method="get">';
$o .= 'Target URL: <input type="text" style="width: 250px;" name="dest" value="' . $_GET['dest'] .'" />';
- $o .= '<input type="submit" name="submit" value="Submit" /></form>';
-
+ $o .= '<input type="submit" name="submit" value="Submit" /></form>';
+
$o .= '<br /><br />';
-
+
if(x($_GET,'dest')) {
if(strpos($_GET['dest'],'@')) {
$_GET['dest'] = $_REQUEST['dest'] = 'https://' . substr($_GET['dest'],strpos($_GET['dest'],'@')+1) . '/channel/' . substr($_GET['dest'],0,strpos($_GET['dest'],'@'));
}
-
+
$_REQUEST['test'] = 1;
$mod = new Magic();
$x = $mod->init($a);
$o .= 'Local Setup returns: ' . print_r($x,true);
-
-
-
+
+
+
if($x['url']) {
$z = z_fetch_url($x['url'] . '&test=1');
if($z['success']) {
@@ -50,12 +47,12 @@ class Authtest extends \Zotlabs\Web\Controller {
$o .= 'fetch url failure.' . print_r($z,true);
}
}
-
+
if(! $auth_success)
$o .= 'Authentication Failed!' . EOL;
}
-
+
return str_replace("\n",'<br />',$o);
}
-
+
}