From d9e4cc3df6db5b303f1f2b485591dff3ee3fceab Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 31 Mar 2022 00:14:48 -0600 Subject: [PATCH] Update PublicApiController, return empty 403 response --- app/Http/Controllers/PublicApiController.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/PublicApiController.php b/app/Http/Controllers/PublicApiController.php index 517e9d97b..7871d8ab9 100644 --- a/app/Http/Controllers/PublicApiController.php +++ b/app/Http/Controllers/PublicApiController.php @@ -422,8 +422,8 @@ class PublicApiController extends Controller public function homeTimelineApi(Request $request) { - if(!Auth::check()) { - return abort(403); + if(!$request->user()) { + return response('', 403); } $this->validate($request,[ @@ -586,7 +586,10 @@ class PublicApiController extends Controller public function networkTimelineApi(Request $request) { - abort_if(!Auth::check(), 403); + if(!$request->user()) { + return response('', 403); + } + abort_if(config('federation.network_timeline') == false, 404); $this->validate($request,[