Skip to content

Commit

Permalink
disallow toggleStar method for crawlers
Browse files Browse the repository at this point in the history
  • Loading branch information
ghost committed Nov 4, 2023
1 parent 178ab23 commit d1e9e72
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Controller/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,12 @@ public function toggleStar(
);
}

// Block crawler requests
if (in_array($request->getClientIp(), explode('|', $this->getParameter('app.crawlers'))))
{
throw $this->createNotFoundException();
}

// Init target user
if (!$userTarget = $userService->getUser($request->get('userId')))
{
Expand Down

0 comments on commit d1e9e72

Please sign in to comment.