From 8e9b544f5084bdce36976da00bf36505faca77f9 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 4 Dec 2019 20:30:04 -0700 Subject: [PATCH] Update SiteController, return 404 for users attempting to view their own Follow Intent --- app/Http/Controllers/SiteController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Http/Controllers/SiteController.php b/app/Http/Controllers/SiteController.php index 93b4b1e54..cba27894a 100644 --- a/app/Http/Controllers/SiteController.php +++ b/app/Http/Controllers/SiteController.php @@ -116,6 +116,7 @@ class SiteController extends Controller ]); $profile = Profile::whereUsername($request->input('user'))->firstOrFail(); $user = $request->user(); + abort_if($profile->id == $user->profile_id, 404); $following = $user != null ? FollowerService::follows($user->profile_id, $profile->id) : false; return view('site.intents.follow', compact('profile', 'user', 'following')); }