Skip to content

Commit 89ea449

Browse files
committed
fix: set max comment retrieval limit to 200
Signed-off-by: grnd-alt <git@belakkaf.net>
1 parent 9d8000b commit 89ea449

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/Service/CommentService.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ public function list(string $cardId, int $limit = 20, int $offset = 0): DataResp
4040
if (!is_numeric($cardId)) {
4141
throw new BadRequestException('A valid card id must be provided');
4242
}
43+
if ($limit > 200) {
44+
$limit = 200;
45+
}
4346
$this->permissionService->checkPermission($this->cardMapper, $cardId, Acl::PERMISSION_READ);
4447
$comments = $this->commentsManager->getForObject(Application::COMMENT_ENTITY_TYPE, $cardId, $limit, $offset);
4548
$result = [];

0 commit comments

Comments
 (0)