浏览代码

Update InboxValidator

Daniel Supernault 5 年之前
父节点
当前提交
938e721e91
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      app/Jobs/InboxPipeline/InboxValidator.php

+ 5 - 3
app/Jobs/InboxPipeline/InboxValidator.php

@@ -61,9 +61,11 @@ class InboxValidator implements ShouldQueue
         }
 
         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) {
-            InboxWorker::dispatchNow($headers, $profile, $payload)->onQueue('high');
+            dispatch(new \App\Jobs\InboxPipeline\InboxWorker($headers, $profile, $payload));
+            return;
         } else {
             return;
         }
@@ -115,7 +117,7 @@ class InboxValidator implements ShouldQueue
         }
         $pkey = openssl_pkey_get_public($actor->public_key);
         $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) { 
             return true;
         } else {