summaryrefslogtreecommitdiffstats
path: root/settings/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'settings/Controller')
-rw-r--r--settings/Controller/ChangePasswordController.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/settings/Controller/ChangePasswordController.php b/settings/Controller/ChangePasswordController.php
index b82751bcac2..2f61d36c3ff 100644
--- a/settings/Controller/ChangePasswordController.php
+++ b/settings/Controller/ChangePasswordController.php
@@ -85,6 +85,7 @@ class ChangePasswordController extends Controller {
/**
* @NoAdminRequired
* @NoSubadminRequired
+ * @BruteForceProtection(action=changePersonalPassword)
*
* @param string $oldpassword
* @param string $newpassword
@@ -95,12 +96,14 @@ class ChangePasswordController extends Controller {
/** @var IUser $user */
$user = $this->userManager->checkPassword($this->userId, $oldpassword);
if ($user === false) {
- return new JSONResponse([
+ $response = new JSONResponse([
'status' => 'error',
'data' => [
'message' => $this->l->t('Wrong password'),
],
]);
+ $response->throttle();
+ return $response;
}
try {