diff --git a/apps/dav/lib/Comments/CommentsPlugin.php b/apps/dav/lib/Comments/CommentsPlugin.php index 2ab7d6ee018..be9984004e5 100644 --- a/apps/dav/lib/Comments/CommentsPlugin.php +++ b/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']);