Skip to content

Commit ffb9962

Browse files
authored
Merge pull request #8580 from nextcloud/backport/8476/stable33
[stable33] Security: Unbounded `limit` parameter in user search can be abused for resource exhaustion
2 parents 4bee1a8 + 01ddd4f commit ffb9962

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/Controller/UserApiController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public function __construct(
3737
#[NoAdminRequired]
3838
#[RequireDocumentSession]
3939
public function index(string $filter = '', int $limit = 5): DataResponse {
40+
$limit = min($limit, 50);
4041
$sessions = $this->sessionService->getAllSessions($this->getSession()->getDocumentId());
4142

4243
$users = [];

0 commit comments

Comments
 (0)