浏览代码

Update FederationController

Daniel Supernault 6 年之前
父节点
当前提交
25edbcdec2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/Http/Controllers/FederationController.php

+ 1 - 1
app/Http/Controllers/FederationController.php

@@ -239,7 +239,7 @@ XML;
         }
         $signatureData = HttpSignature::parseSignatureHeader($signature);
         $keyId = Helpers::validateUrl($signatureData['keyId']);
-        $actor = Profile::whereKeyId($keyId)->first();
+        $actor = Profile::whereKeyId($keyId)->whereNotNull('remote_url')->firstOrFail();
         $res = Zttp::timeout(5)->withHeaders([
           'Accept'     => 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"',
           'User-Agent' => 'PixelFedBot v0.1 - https://pixelfed.org',