Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/serverinfo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2021-06-02 11:21:09 +0300
committerGitHub <noreply@github.com>2021-06-02 11:21:09 +0300
commit530559b6688c53d67242f6de5c8248848c1c11d3 (patch)
treeb6ae6224ac693335cef68fb78a89047a74aa3b79
parente928e50bf8db6312c824faef75d2f0cf65b11511 (diff)
parent741acf63f8c271191a14bf72435c8f64a42fd706 (diff)
Merge pull request #312 from nextcloud/master-add-ratelimit
Add ratelimit to ServerInfo API endpoint
-rw-r--r--lib/Controller/ApiController.php2
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;
}