Skip to content

Commit af31c47

Browse files
authored
Merge pull request #7912 from nextcloud/backport/7788/stable33
[stable33] fix: set max comment retrieval limit to 200
2 parents dd2dba7 + 7499815 commit af31c47

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
@@ -35,6 +35,9 @@ public function __construct(
3535
}
3636

3737
public function list(int $cardId, int $limit = 20, int $offset = 0): DataResponse {
38+
if ($limit > 200) {
39+
$limit = 200;
40+
}
3841
$this->permissionService->checkPermission($this->cardMapper, $cardId, Acl::PERMISSION_READ);
3942
$comments = $this->commentsManager->getForObject(Application::COMMENT_ENTITY_TYPE, (string)$cardId, $limit, $offset);
4043
$result = [];

0 commit comments

Comments
 (0)