diff options
author | nobody <nobody@zotlabs.com> | 2021-06-17 14:57:47 -0700 |
---|---|---|
committer | nobody <nobody@zotlabs.com> | 2021-06-17 14:57:47 -0700 |
commit | efda8aac1d7d90fd7eda4a449332eedf74342951 (patch) | |
tree | 3373c0579168776cccda5224b6b33ce59fa9b274 /Zotlabs/Module/Zfinger.php | |
parent | 686530c1873f98d724355bf3f456243b1b7fdadd (diff) | |
parent | a84cec4acddf6804a88fcda52e4437c91785dfb2 (diff) | |
download | volse-hubzilla-efda8aac1d7d90fd7eda4a449332eedf74342951.tar.gz volse-hubzilla-efda8aac1d7d90fd7eda4a449332eedf74342951.tar.bz2 volse-hubzilla-efda8aac1d7d90fd7eda4a449332eedf74342951.zip |
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'Zotlabs/Module/Zfinger.php')
-rw-r--r-- | Zotlabs/Module/Zfinger.php | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/Zotlabs/Module/Zfinger.php b/Zotlabs/Module/Zfinger.php deleted file mode 100644 index ce7117ad8..000000000 --- a/Zotlabs/Module/Zfinger.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php -namespace Zotlabs\Module; - -use Zotlabs\Web\HTTPSig; -use Zotlabs\Lib\Libzot; - -class Zfinger extends \Zotlabs\Web\Controller { - - function init() { - - require_once('include/zot.php'); - require_once('include/crypto.php'); - - $x = zotinfo($_REQUEST); - - if($x && $x['guid'] && $x['guid_sig']) { - $chan_hash = make_xchan_hash($x['guid'],$x['guid_sig']); - if($chan_hash) { - $chan = channelx_by_hash($chan_hash); - } - } - - $headers = []; - $headers['Content-Type'] = 'application/json' ; - $ret = json_encode($x); - - if($chan) { - $headers['Digest'] = HTTPSig::generate_digest_header($ret); - $h = HTTPSig::create_sig($headers,$chan['channel_prvkey'], channel_url($chan)); - HTTPSig::set_headers($h); - } - else { - foreach($headers as $k => $v) { - header($k . ': ' . $v); - } - } - - echo $ret; - killme(); - - } - -} |