summaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2017-04-19 09:27:23 +0200
committerGitHub <noreply@github.com>2017-04-19 09:27:23 +0200
commitad24b86013d60e7efe2487ae06478f624b01824f (patch)
tree1b8d7443469ed5da339ba880b69a445784cd73bd /apps/federatedfilesharing
parentf1ddb939a0f263582acbadf4e2dd6277638f2ce3 (diff)
parent727688ebd9c7cdeea4495e93f11b7f7bef9af109 (diff)
downloadnextcloud-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.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 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);