mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 16:23:16 +00:00
Update InboxValidator
This commit is contained in:
parent
3ec5102c24
commit
938e721e91
1 changed files with 5 additions and 3 deletions
|
@ -61,9 +61,11 @@ class InboxValidator implements ShouldQueue
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->verifySignature($headers, $profile, $payload) == true) {
|
if($this->verifySignature($headers, $profile, $payload) == true) {
|
||||||
InboxWorker::dispatchNow($headers, $profile, $payload)->onQueue('high');
|
dispatch(new \App\Jobs\InboxPipeline\InboxWorker($headers, $profile, $payload));
|
||||||
|
return;
|
||||||
} else if($this->blindKeyRotation($headers, $profile, $payload) == true) {
|
} else if($this->blindKeyRotation($headers, $profile, $payload) == true) {
|
||||||
InboxWorker::dispatchNow($headers, $profile, $payload)->onQueue('high');
|
dispatch(new \App\Jobs\InboxPipeline\InboxWorker($headers, $profile, $payload));
|
||||||
|
return;
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -115,7 +117,7 @@ class InboxValidator implements ShouldQueue
|
||||||
}
|
}
|
||||||
$pkey = openssl_pkey_get_public($actor->public_key);
|
$pkey = openssl_pkey_get_public($actor->public_key);
|
||||||
$inboxPath = "/users/{$profile->username}/inbox";
|
$inboxPath = "/users/{$profile->username}/inbox";
|
||||||
list($verified, $headers) = HTTPSignature::verify($pkey, $signatureData, $headers, $inboxPath, $body);
|
list($verified, $headers) = HttpSignature::verify($pkey, $signatureData, $headers, $inboxPath, $body);
|
||||||
if($verified == 1) {
|
if($verified == 1) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue