diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php index 0725e520b2d..37a564d7654 100644 --- a/apps/files_sharing/lib/Controller/ShareController.php +++ b/apps/files_sharing/lib/Controller/ShareController.php @@ -523,11 +523,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());