Explorar o código

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

Update FederationController
daniel %!s(int64=6) %!d(string=hai) anos
pai
achega
e51b14f96a
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      app/Http/Controllers/FederationController.php

+ 3 - 0
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);