Skip to content

Commit 2c3ca85

Browse files
authored
Merge pull request #7966 from nextcloud/backport/7788/stable31
fix: set max comment retrieval limit to 200
2 parents cc07d48 + 767b85b commit 2c3ca85

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)