]> source.dussan.org Git - nextcloud-server.git/commitdiff
Throttle MountPublicLinkController when share is not found 26972/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Wed, 12 May 2021 09:21:48 +0000 (11:21 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Wed, 12 May 2021 19:29:07 +0000 (19:29 +0000)
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php

index 9e79215fe8cf337e723f9a57d49dd964f67a758b..cc62da27947f9baddbe936a3fe04494f1db50ea7 100644 (file)
@@ -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