Merge pull request #58046 from nextcloud/backport/58043/stable31

[stable31] fix(comments): Put a limit to the limit
This commit is contained in:
Joas Schilling 2026-02-04 10:01:41 +01:00 committed by GitHub
commit f886b27eb2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -157,6 +157,7 @@ class CommentsPlugin extends ServerPlugin {
if (!is_null($args['datetime'])) {
$args['datetime'] = new \DateTime((string)$args['datetime']);
}
$args['limit'] = min(max(1, $args['limit']), 100);
$results = $node->findChildren($args['limit'], $args['offset'], $args['datetime']);