Merge pull request #19360 from nextcloud/backport/19349/stable18

[stable18] Prevent archieved download on secure view
This commit is contained in:
blizzz 2020-02-10 09:32:35 +01:00 committed by GitHub
commit fa8b998b62

View file

@ -541,11 +541,14 @@ class ShareController extends AuthPublicShareController {
} }
} }
if (!$this->validateShare($share)) { if (!$this->validateShare($share)) {
throw new NotFoundException(); throw new NotFoundException();
} }
if ($share->getHideDownload()) {
return new NotFoundResponse();
}
$userFolder = $this->rootFolder->getUserFolder($share->getShareOwner()); $userFolder = $this->rootFolder->getUserFolder($share->getShareOwner());
$originalSharePath = $userFolder->getRelativePath($share->getNode()->getPath()); $originalSharePath = $userFolder->getRelativePath($share->getNode()->getPath());