diff --git a/lib/Dav/Faces/FaceRoot.php b/lib/Dav/Faces/FaceRoot.php index 9bdb3297..73147ee4 100644 --- a/lib/Dav/Faces/FaceRoot.php +++ b/lib/Dav/Faces/FaceRoot.php @@ -109,6 +109,9 @@ public function getChild($name): FacePhoto { } catch (DoesNotExistException $e) { throw new NotFound(); } + if ($detection->getClusterId() !== $this->cluster->getId()) { + throw new NotFound(); + } return new FacePhoto($this->detectionMapper, $detection, $this->rootFolder->getUserFolder($this->user->getUID()), $this->tagManager, $this->previewManager); } diff --git a/lib/Db/FaceDetection.php b/lib/Db/FaceDetection.php index 8c30533e..ca7721a2 100644 --- a/lib/Db/FaceDetection.php +++ b/lib/Db/FaceDetection.php @@ -27,7 +27,7 @@ * @method setHeight(float $height) * @method setWidth(float $width) * @method setClusterId(int|null $clusterId) - * @method ?int getClusterId() + * @method int|null getClusterId() * @method float getThreshold() * @method setThreshold(float $threshold) */