diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2021-05-14 11:55:29 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-14 11:55:29 +0300 |
commit | 633200df4ae8bbc3ae6d1de7ad0756c6b6406b0f (patch) | |
tree | 3ce0c735e033de1ec5c71d172a4822580d96badf /apps | |
parent | 7fa9c52585588b1f8f46da5d8a9531ed67008790 (diff) | |
parent | dd154011144b5570e76658d5e8ac9864b3ef6088 (diff) |
Merge pull request #26970 from nextcloud/backport/26958/stable19
[stable19] Throttle MountPublicLinkController when share is not found
Diffstat (limited to 'apps')
-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 9e79215fe8c..cc62da27947 100644 --- a/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php +++ b/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php @@ -142,7 +142,9 @@ class MountPublicLinkController extends Controller { list(, $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 |