summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2021-05-12 11:21:48 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2021-05-12 16:26:31 +0200
commit50517a262202da99b77feb92e3a9f8301923f018 (patch)
tree6fb545505a087df8fef38e5fa50015ab2baf8dc8
parentb01c7289ef674a8c61f23c505680a8cbc74b981b (diff)
downloadnextcloud-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.php4
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