Update InboxPipeline, fixes #3306

pull/3319/head
Daniel Supernault 3 years ago
parent 72918a4b09
commit 20710f4d6e
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7

@ -223,6 +223,9 @@ class InboxValidator implements ShouldQueue
'User-Agent' => 'PixelfedBot v0.1 - https://pixelfed.org',
])->get($actor->remote_url);
$res = json_decode($res->body(), true, 8);
if(!$res || empty($res) || !isset($res['publicKey']) || !isset($res['publicKey']['id'])) {
return;
}
if($res['publicKey']['id'] !== $actor->key_id) {
return;
}

@ -211,6 +211,9 @@ class InboxWorker implements ShouldQueue
'User-Agent' => 'PixelfedBot v0.1 - https://pixelfed.org',
])->get($actor->remote_url);
$res = json_decode($res->body(), true, 8);
if(!$res || empty($res) || !isset($res['publicKey']) || !isset($res['publicKey']['id'])) {
return;
}
if($res['publicKey']['id'] !== $actor->key_id) {
return;
}

Loading…
Cancel
Save