diff options
author | Joas Schilling <coding@schilljs.com> | 2020-02-07 12:45:29 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-02-07 12:46:23 +0100 |
commit | 35d4ca4d5de716f874181a15c49773e32e641b22 (patch) | |
tree | f0fe8f14764c295f3a454c2da5b7c406f1760a9c /apps | |
parent | d2d7e37b7bf00ea7929da02459e4abb8640d064a (diff) | |
download | nextcloud-server-35d4ca4d5de716f874181a15c49773e32e641b22.tar.gz nextcloud-server-35d4ca4d5de716f874181a15c49773e32e641b22.zip |
Prevent archieved download on secure view
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareController.php | 5 |
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 1542cbe4924..96dff4dddbf 100644 --- a/apps/files_sharing/lib/Controller/ShareController.php +++ b/apps/files_sharing/lib/Controller/ShareController.php @@ -529,11 +529,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()); |