Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Commit e0d8f6a

Browse files
committed
Check for key app on authorization
1 parent f08e4f2 commit e0d8f6a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Statistics/Http/Middleware/Authorize.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ class Authorize
88
{
99
public function handle($request, $next)
1010
{
11-
return is_null(App::findBySecret($request->secret)) ? abort(403) : $next($request);
11+
$app = App::findByKey($request->key);
12+
13+
return is_null($app) || $app->secret !== $request->secret
14+
? abort(403)
15+
: $next($request);
1216
}
1317
}

0 commit comments

Comments
 (0)