diff options
author | Mario <mario@mariovavti.com> | 2022-02-08 20:12:16 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-02-08 20:12:16 +0000 |
commit | 4c8b84633a55f06cf3f43866f9f76a330ac9af76 (patch) | |
tree | 099d42cbe8d5e1ffe91cc0e8aa057bbd422ba174 | |
parent | c0dd4d748db3e07d49ae72e2e37d0cc5c74011c4 (diff) | |
download | volse-hubzilla-4c8b84633a55f06cf3f43866f9f76a330ac9af76.tar.gz volse-hubzilla-4c8b84633a55f06cf3f43866f9f76a330ac9af76.tar.bz2 volse-hubzilla-4c8b84633a55f06cf3f43866f9f76a330ac9af76.zip |
revert deleted flag for webfinger and zotfinger key
-rw-r--r-- | Zotlabs/Lib/Activity.php | 2 | ||||
-rw-r--r-- | Zotlabs/Web/HTTPSig.php | 30 |
2 files changed, 11 insertions, 21 deletions
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' => []]; |