mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Update InboxPipeline, fail earlier for invalid public keys. Fixes #2648
This commit is contained in:
parent
40db9a1296
commit
d1c5e9b867
2 changed files with 6 additions and 0 deletions
|
@ -173,6 +173,9 @@ class InboxValidator implements ShouldQueue
|
|||
return;
|
||||
}
|
||||
$pkey = openssl_pkey_get_public($actor->public_key);
|
||||
if(!$pkey) {
|
||||
return 0;
|
||||
}
|
||||
$inboxPath = "/users/{$profile->username}/inbox";
|
||||
list($verified, $headers) = HttpSignature::verify($pkey, $signatureData, $headers, $inboxPath, $body);
|
||||
if($verified == 1) {
|
||||
|
|
|
@ -161,6 +161,9 @@ class InboxWorker implements ShouldQueue
|
|||
return;
|
||||
}
|
||||
$pkey = openssl_pkey_get_public($actor->public_key);
|
||||
if(!$pkey) {
|
||||
return 0;
|
||||
}
|
||||
$inboxPath = "/f/inbox";
|
||||
list($verified, $headers) = HttpSignature::verify($pkey, $signatureData, $headers, $inboxPath, $body);
|
||||
if($verified == 1) {
|
||||
|
|
Loading…
Reference in a new issue