diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php index 1542cbe492460..96dff4dddbf95 100644 --- a/apps/files_sharing/lib/Controller/ShareController.php +++ b/apps/files_sharing/lib/Controller/ShareController.php @@ -529,11 +529,14 @@ public function downloadShare($token, $files = null, $path = '', $downloadStartS } } - if (!$this->validateShare($share)) { throw new NotFoundException(); } + if ($share->getHideDownload()) { + return new NotFoundResponse(); + } + $userFolder = $this->rootFolder->getUserFolder($share->getShareOwner()); $originalSharePath = $userFolder->getRelativePath($share->getNode()->getPath());