Skip to content

Commit

Permalink
Merge pull request #26958 from nextcloud/enh/MountPublicLinkControlle…
Browse files Browse the repository at this point in the history
…r/throttling

Throttle MountPublicLinkController when share is not found
  • Loading branch information
rullzer authored May 12, 2021
2 parents b01c728 + 50517a2 commit 9b36252
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 = '') {
[, $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 9b36252

Please sign in to comment.