diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php index f5cbb63e08..11cab9cfce 100644 --- a/apps/files_sharing/lib/Controller/ShareController.php +++ b/apps/files_sharing/lib/Controller/ShareController.php @@ -524,11 +524,14 @@ class ShareController extends AuthPublicShareController { } } - 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());