Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2021-05-12 12:21:48 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2021-05-12 17:26:31 +0300
commit50517a262202da99b77feb92e3a9f8301923f018 (patch)
tree6fb545505a087df8fef38e5fa50015ab2baf8dc8 /apps/federatedfilesharing/lib
parentb01c7289ef674a8c61f23c505680a8cbc74b981b (diff)
Throttle MountPublicLinkController when share is not found
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/federatedfilesharing/lib')
-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