Merge pull request #19349 from nextcloud/bugfix/noid/prevent-download-on-secure-view

Prevent archieved download on secure view
This commit is contained in:
Roeland Jago Douma 2020-02-08 10:18:24 +01:00 committed by GitHub
commit 302ea0650e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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());