Merge pull request #6774 from pixelfed/fix/oauth-scope-bypass-remove-follower-6643

Fix: OAuth accountRemoveFollowById to check token.
pull/6803/head
Shlee 4 weeks ago committed by GitHub
commit 68dca50973
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -4751,7 +4751,7 @@ class ApiV1Controller extends Controller
public function accountRemoveFollowById(Request $request, $id)
{
abort_if(! $request->user(), 403);
abort_if(! $request->user() || ! $request->user()->token(), 403);
abort_unless($request->user()->tokenCan('follow'), 403);
$pid = $request->user()->profile_id;

Loading…
Cancel
Save