Skip to content

Commit

Permalink
fix: Only throttle on invalid requests for public share links
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr committed Nov 28, 2023
1 parent 9c937a3 commit 9642615
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ public function beforeController($controller, $methodName) {
$controller->setToken($token);

if (!$controller->isValidToken()) {
$this->throttle($bruteforceProtectionAction, $token);

$controller->shareNotFound();
throw new NotFoundException();
}
Expand All @@ -88,7 +90,6 @@ public function beforeController($controller, $methodName) {

// If authentication succeeds just continue
if ($controller->isAuthenticated()) {
$this->throttle($bruteforceProtectionAction, $token);
return;
}

Expand Down

0 comments on commit 9642615

Please sign in to comment.