diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2021-05-12 11:21:48 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2021-05-12 16:26:31 +0200 |
commit | 50517a262202da99b77feb92e3a9f8301923f018 (patch) | |
tree | 6fb545505a087df8fef38e5fa50015ab2baf8dc8 | |
parent | b01c7289ef674a8c61f23c505680a8cbc74b981b (diff) | |
download | nextcloud-server-50517a262202da99b77feb92e3a9f8301923f018.tar.gz nextcloud-server-50517a262202da99b77feb92e3a9f8301923f018.zip |
Throttle MountPublicLinkController when share is not found
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-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 |