summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-04-14 13:42:40 +0200
committerLukas Reschke <lukas@statuscode.ch>2017-04-14 13:42:40 +0200
commit727688ebd9c7cdeea4495e93f11b7f7bef9af109 (patch)
tree9f04e334eee326ccd0397f73d5e757aeb603de40 /apps/files_sharing/lib
parentf40b9fa9bd03b9c9590976eefa21aba7085f32f2 (diff)
downloadnextcloud-server-727688ebd9c7cdeea4495e93f11b7f7bef9af109.tar.gz
nextcloud-server-727688ebd9c7cdeea4495e93f11b7f7bef9af109.zip
Adjust existing bruteforce protection code
- Moves code to annotation - Adds the `throttle()` call on the responses on existing annotations Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/Controller/ShareController.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php
index 732a1d32ee7..759d5ee4163 100644
--- a/apps/files_sharing/lib/Controller/ShareController.php
+++ b/apps/files_sharing/lib/Controller/ShareController.php
@@ -182,7 +182,9 @@ class ShareController extends Controller {
return new RedirectResponse($this->urlGenerator->linkToRoute('files_sharing.sharecontroller.showShare', array('token' => $token)));
}
- return new TemplateResponse($this->appName, 'authenticate', array('wrongpw' => true), 'guest');
+ $response = new TemplateResponse($this->appName, 'authenticate', array('wrongpw' => true), 'guest');
+ $response->throttle();
+ return $response;
}
/**