Skip to content

Commit 72ed55f

Browse files
authored
Merge pull request #7788 from nextcloud/fix/max-comment-retrieval-limit
fix: set max comment retrieval limit to 200
2 parents 01fd051 + 39ab73e commit 72ed55f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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)