1
0
Fork 0

Merge pull request #990 from pixelfed/frontend-ui-refactor

Update FederationController
This commit is contained in:
daniel 2019-03-08 00:11:41 -07:00 committed by GitHub
commit e51b14f96a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -262,6 +262,9 @@ XML;
if(!$actor) { if(!$actor) {
$actor = Helpers::profileFirstOrNew($bodyDecoded['actor']); $actor = Helpers::profileFirstOrNew($bodyDecoded['actor']);
} }
if(!$actor) {
return false;
}
$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, $request->headers->all(), $inboxPath, $body); list($verified, $headers) = HTTPSignature::verify($pkey, $signatureData, $request->headers->all(), $inboxPath, $body);