]> source.dussan.org Git - nextcloud-server.git/commitdiff
Prevent archieved download on secure view 19349/head
authorJoas Schilling <coding@schilljs.com>
Fri, 7 Feb 2020 11:45:29 +0000 (12:45 +0100)
committerJoas Schilling <coding@schilljs.com>
Fri, 7 Feb 2020 11:46:23 +0000 (12:46 +0100)
Signed-off-by: Joas Schilling <coding@schilljs.com>
apps/files_sharing/lib/Controller/ShareController.php

index 1542cbe4924600db285d380334f38a5955f034b7..96dff4dddbf958dc3546cf1a160818cf6546030b 100644 (file)
@@ -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());