Skip to content

Commit 2e5d89a

Browse files
authored
Merge pull request #8476 from tomaioo/fix/security/unbounded-limit-parameter-in-user-search
Security: Unbounded `limit` parameter in user search can be abused for resource exhaustion
2 parents 86063a0 + 685350f commit 2e5d89a

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)