diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2021-05-12 21:20:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-12 21:20:09 +0200 |
commit | 9b36252de0f7cc6b971c8a23524495e38f35dcf2 (patch) | |
tree | 6fb545505a087df8fef38e5fa50015ab2baf8dc8 | |
parent | b01c7289ef674a8c61f23c505680a8cbc74b981b (diff) | |
parent | 50517a262202da99b77feb92e3a9f8301923f018 (diff) | |
download | nextcloud-server-9b36252de0f7cc6b971c8a23524495e38f35dcf2.tar.gz nextcloud-server-9b36252de0f7cc6b971c8a23524495e38f35dcf2.zip |
Merge pull request #26958 from nextcloud/enh/MountPublicLinkController/throttling
Throttle MountPublicLinkController when share is not found
-rw-r--r-- | apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php b/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php index 22197988a3b..372113aead3 100644 --- a/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php +++ b/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php @@ -142,7 +142,9 @@ class MountPublicLinkController extends Controller { [, $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 |