summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-02-08 10:18:24 +0100
committerGitHub <noreply@github.com>2020-02-08 10:18:24 +0100
commit302ea0650e1628b7a34bf2cfdb8989346145301b (patch)
treee64f1925806060eb1a648d89e5bcd08d0dc9fdb4
parentef31e8c12910fbf1c801064c5124361d7db91315 (diff)
parent35d4ca4d5de716f874181a15c49773e32e641b22 (diff)
downloadnextcloud-server-302ea0650e1628b7a34bf2cfdb8989346145301b.tar.gz
nextcloud-server-302ea0650e1628b7a34bf2cfdb8989346145301b.zip
Merge pull request #19349 from nextcloud/bugfix/noid/prevent-download-on-secure-view
Prevent archieved download on secure view
-rw-r--r--apps/files_sharing/lib/Controller/ShareController.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php
index 95e0097b91b..0cb0b4eb5fa 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());