From ea59a17895d599bb85be8e449ff6b13e685403e7 Mon Sep 17 00:00:00 2001 From: Alex Renoki Date: Tue, 2 Mar 2021 19:58:09 +0200 Subject: [PATCH] Reverted findByKey() --- src/Statistics/Http/Middleware/Authorize.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Statistics/Http/Middleware/Authorize.php b/src/Statistics/Http/Middleware/Authorize.php index 4611dc59f5..277d8e401b 100644 --- a/src/Statistics/Http/Middleware/Authorize.php +++ b/src/Statistics/Http/Middleware/Authorize.php @@ -8,10 +8,6 @@ class Authorize { public function handle($request, $next) { - $app = App::findByKey($request->key); - - return is_null($app) || $app->secret !== $request->secret - ? abort(403) - : $next($request); + return is_null(App::findBySecret($request->secret)) ? abort(403) : $next($request); } }