mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-11 22:50:45 +00:00
Update InboxPipeline, fixes #3306
This commit is contained in:
parent
72918a4b09
commit
20710f4d6e
2 changed files with 6 additions and 0 deletions
|
@ -223,6 +223,9 @@ class InboxValidator implements ShouldQueue
|
||||||
'User-Agent' => 'PixelfedBot v0.1 - https://pixelfed.org',
|
'User-Agent' => 'PixelfedBot v0.1 - https://pixelfed.org',
|
||||||
])->get($actor->remote_url);
|
])->get($actor->remote_url);
|
||||||
$res = json_decode($res->body(), true, 8);
|
$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) {
|
if($res['publicKey']['id'] !== $actor->key_id) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -211,6 +211,9 @@ class InboxWorker implements ShouldQueue
|
||||||
'User-Agent' => 'PixelfedBot v0.1 - https://pixelfed.org',
|
'User-Agent' => 'PixelfedBot v0.1 - https://pixelfed.org',
|
||||||
])->get($actor->remote_url);
|
])->get($actor->remote_url);
|
||||||
$res = json_decode($res->body(), true, 8);
|
$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) {
|
if($res['publicKey']['id'] !== $actor->key_id) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue