From 6db47f7a6ee8874bfc118dba18fa35ee12af3b4c Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 7 Feb 2020 12:45:29 +0100 Subject: [PATCH] Prevent archieved download on secure view Signed-off-by: Joas Schilling --- apps/files_sharing/lib/Controller/ShareController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php index 95e0097b91..0cb0b4eb5f 100644 --- a/apps/files_sharing/lib/Controller/ShareController.php +++ b/apps/files_sharing/lib/Controller/ShareController.php @@ -541,11 +541,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());