Skip to content

Commit

Permalink
Merge pull request #26971 from nextcloud/backport/26958/stable20
Browse files Browse the repository at this point in the history
[stable20] Throttle MountPublicLinkController when share is not found
  • Loading branch information
rullzer authored May 14, 2021
2 parents 18c62ac + 1bba950 commit 7d3bd54
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ public function createFederatedShare($shareWith, $token, $password = '') {
list(, $server) = $this->addressHandler->splitUserRemote($shareWith);
$share = $this->shareManager->getShareByToken($token);
} catch (HintException $e) {
return new JSONResponse(['message' => $e->getHint()], Http::STATUS_BAD_REQUEST);
$response = new JSONResponse(['message' => $e->getHint()], Http::STATUS_BAD_REQUEST);
$response->throttle();
return $response;
}

// make sure that user is authenticated in case of a password protected link
Expand Down

0 comments on commit 7d3bd54

Please sign in to comment.