From 727688ebd9c7cdeea4495e93f11b7f7bef9af109 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Fri, 14 Apr 2017 13:42:40 +0200 Subject: Adjust existing bruteforce protection code - Moves code to annotation - Adds the `throttle()` call on the responses on existing annotations Signed-off-by: Lukas Reschke --- apps/files_sharing/lib/Controller/ShareController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'apps/files_sharing/lib') 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; } /** -- cgit v1.2.3