From ff15e0eed1fe4d9300a7787a5eea921fe1fadbc1 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 8 Mar 2019 00:10:54 -0700 Subject: [PATCH] Update FederationController --- app/Http/Controllers/FederationController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Http/Controllers/FederationController.php b/app/Http/Controllers/FederationController.php index b05c1409..a291c0c0 100644 --- a/app/Http/Controllers/FederationController.php +++ b/app/Http/Controllers/FederationController.php @@ -262,6 +262,9 @@ XML; if(!$actor) { $actor = Helpers::profileFirstOrNew($bodyDecoded['actor']); } + if(!$actor) { + return false; + } $pkey = openssl_pkey_get_public($actor->public_key); $inboxPath = "/users/{$profile->username}/inbox"; list($verified, $headers) = HTTPSignature::verify($pkey, $signatureData, $request->headers->all(), $inboxPath, $body);