diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2017-04-19 09:27:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-19 09:27:23 +0200 |
commit | ad24b86013d60e7efe2487ae06478f624b01824f (patch) | |
tree | 1b8d7443469ed5da339ba880b69a445784cd73bd /apps/federatedfilesharing | |
parent | f1ddb939a0f263582acbadf4e2dd6277638f2ce3 (diff) | |
parent | 727688ebd9c7cdeea4495e93f11b7f7bef9af109 (diff) | |
download | nextcloud-server-ad24b86013d60e7efe2487ae06478f624b01824f.tar.gz nextcloud-server-ad24b86013d60e7efe2487ae06478f624b01824f.zip |
Merge pull request #4350 from nextcloud/adjust-old-bruteforce-protection-annotations
Adjust existing bruteforce protection code
Diffstat (limited to 'apps/federatedfilesharing')
-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 9f848fbbb78..5cdba0cfffd 100644 --- a/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php +++ b/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php @@ -148,10 +148,12 @@ class MountPublicLinkController extends Controller { $authenticated = $this->session->get('public_link_authenticated') === $share->getId() || $this->shareManager->checkPassword($share, $password); if (!empty($storedPassword) && !$authenticated ) { - return new JSONResponse( + $response = new JSONResponse( ['message' => 'No permission to access the share'], Http::STATUS_BAD_REQUEST ); + $response->throttle(); + return $response; } $share->setSharedWith($shareWith); |