From 4c8b84633a55f06cf3f43866f9f76a330ac9af76 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 8 Feb 2022 20:12:16 +0000 Subject: revert deleted flag for webfinger and zotfinger key --- Zotlabs/Lib/Activity.php | 2 ++ Zotlabs/Web/HTTPSig.php | 30 +++++++++--------------------- 2 files changed, 11 insertions(+), 21 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index e51922c86..9f08c87b5 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -61,6 +61,8 @@ class Activity { } logger('fetch: ' . $url, LOGGER_DEBUG); + hz_syslog('fetch: ' . $url, LOGGER_DEBUG); + bt_syslog('fetch'); if (strpos($url, 'x-zot:') === 0) { $x = ZotURL::fetch($url, $channel); diff --git a/Zotlabs/Web/HTTPSig.php b/Zotlabs/Web/HTTPSig.php index e5d73293a..ef191b171 100644 --- a/Zotlabs/Web/HTTPSig.php +++ b/Zotlabs/Web/HTTPSig.php @@ -230,25 +230,25 @@ class HTTPSig { return ['public_key' => $key]; } - $deleted = false; - if ($keytype === 'deleted') { - $deleted = true; - } - if ($keytype === 'zot6') { - $key = self::get_zotfinger_key($id, $force, $deleted); + $key = self::get_zotfinger_key($id, $force); if ($key) { return $key; } } if (strpos($id, '#') === false) { - $key = self::get_webfinger_key($id, $force, $deleted); + $key = self::get_webfinger_key($id, $force); if ($key) { return $key; } } + $deleted = false; + if ($keytype === 'deleted') { + $deleted = true; + } + $key = self::get_activitystreams_key($id, $force, $deleted); return $key; @@ -331,7 +331,7 @@ class HTTPSig { * false if no pub key found, otherwise return an array with the pub key */ - static function get_webfinger_key($id, $force = false, $deleted = false) { + static function get_webfinger_key($id, $force = false) { if (!$force) { $x = q("select * from xchan left join hubloc on xchan_hash = hubloc_hash where hubloc_id_url = '%s' and hubloc_network in ('zot6', 'activitypub') order by hubloc_id desc", @@ -347,12 +347,6 @@ class HTTPSig { } } - if ($deleted) { - // If we received a delete and we do not have the record cached, - // we probably never saw this actor. Do not try to fetch it now. - return false; - } - $wf = Webfinger::exec($id); $key = ['portable_id' => '', 'public_key' => '', 'hubloc' => []]; @@ -384,7 +378,7 @@ class HTTPSig { * false if no pub key found, otherwise return an array with the public key */ - static function get_zotfinger_key($id, $force = false, $deleted = false) { + static function get_zotfinger_key($id, $force = false) { if (!$force) { $x = q("select * from xchan left join hubloc on xchan_hash = hubloc_hash where hubloc_id_url = '%s' and hubloc_network = 'zot6' order by hubloc_id desc", dbesc($id) @@ -399,12 +393,6 @@ class HTTPSig { } } - if ($deleted) { - // If we received a delete and we do not have the record cached, - // we probably never saw this actor. Do not try to fetch it now. - return false; - } - $wf = Webfinger::exec($id); $key = ['portable_id' => '', 'public_key' => '', 'hubloc' => []]; -- cgit v1.2.3