diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2021-06-02 11:21:09 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-02 11:21:09 +0300 |
commit | 530559b6688c53d67242f6de5c8248848c1c11d3 (patch) | |
tree | b6ae6224ac693335cef68fb78a89047a74aa3b79 | |
parent | e928e50bf8db6312c824faef75d2f0cf65b11511 (diff) | |
parent | 741acf63f8c271191a14bf72435c8f64a42fd706 (diff) |
Merge pull request #312 from nextcloud/master-add-ratelimit
Add ratelimit to ServerInfo API endpoint
-rw-r--r-- | lib/Controller/ApiController.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Controller/ApiController.php b/lib/Controller/ApiController.php index d9fc6fa..cebd47f 100644 --- a/lib/Controller/ApiController.php +++ b/lib/Controller/ApiController.php @@ -146,12 +146,14 @@ class ApiController extends OCSController { * @NoCSRFRequired * @NoAdminRequired * @PublicPage + * @BruteForceProtection(action=serverinfo) * * @return DataResponse */ public function info(): DataResponse { if (!$this->checkAuthorized()) { $response = new DataResponse(['message' => 'Unauthorized']); + $response->throttle(); $response->setStatus(Http::STATUS_UNAUTHORIZED); return $response; } |