summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2014-11-25 13:52:44 +0100
committerLukas Reschke <lukas@owncloud.com>2014-11-25 13:52:44 +0100
commit32a90911b0d99c009d077eddbbdda4599db30073 (patch)
treec21426e8eaf0ccb0cf6d6fd290be00efb58317d6
parent8ea0187ecdf37bc26aa1c0260e34f2dd9c744e99 (diff)
downloadnextcloud-server-32a90911b0d99c009d077eddbbdda4599db30073.tar.gz
nextcloud-server-32a90911b0d99c009d077eddbbdda4599db30073.zip
The "dir" key is used within the public sharing template to indicate in which directory the user currently is when sharing a directory with subdirectories. This is needed by the JS scripts.
However, when not accessing a directory then "dir" was set to the relative path of the file (from the user's home directory), meaning that for every public shared file the sharee can see the path. (For example if you share the file "foo.txt" from "finances/topsecret/" the sharee would still see the path "finances/topsecret/" from the shared HTML template) This is not the excpected behaviour and can be considered a privacy problem, this patch addresses this by setting "dir" to an empty key. Port of https://github.com/owncloud/core/pull/12262, approved with https://github.com/owncloud/core/pull/12262#issuecomment-64394040
-rw-r--r--apps/files_sharing/public.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index 8794e4a69d4..1145b2ce2a9 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -174,7 +174,7 @@ if (isset($path)) {
$tmpl->assign('downloadURL',
OCP\Util::linkToPublic('files') . $urlLinkIdentifiers . '&download&path=' . urlencode($getPath));
} else {
- $tmpl->assign('dir', $dir);
+ $tmpl->assign('dir', '');
// Show file preview if viewer is available
if ($type == 'file') {