diff --git a/lib/Controller/EndpointController.php b/lib/Controller/EndpointController.php index d931b178e..acbe1a795 100644 --- a/lib/Controller/EndpointController.php +++ b/lib/Controller/EndpointController.php @@ -191,6 +191,11 @@ public function confirmIdsForUser(string $apiVersion, array $ids): DataResponse return new DataResponse([], Http::STATUS_BAD_REQUEST); } + $ids = array_unique(array_filter(array_map( + static fn ($id) => is_numeric($id) ? (int) $id : 0, + $ids + ))); + $existingIds = $this->handler->confirmIdsForUser($this->getCurrentUser(), $ids); return new DataResponse($existingIds, Http::STATUS_OK); }