fix(comments): Put a limit to the limit

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/58045/head
Joas Schilling 3 months ago committed by backportbot[bot]
parent 9239cad148
commit 273da163f8
  1. 1
      apps/dav/lib/Comments/CommentsPlugin.php

@ -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']);

Loading…
Cancel
Save