From 35d4ca4d5de716f874181a15c49773e32e641b22 Mon Sep 17 00:00:00 2001
From: Joas Schilling <coding@schilljs.com>
Date: Fri, 7 Feb 2020 12:45:29 +0100
Subject: [PATCH] Prevent archieved download on secure view

Signed-off-by: Joas Schilling <coding@schilljs.com>
---
 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 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());
 
-- 
GitLab