[Pkg-owncloud-commits] [owncloud] 52/74: 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.

David Prévot taffit at moszumanska.debian.org
Tue Dec 2 22:04:37 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 32a90911b0d99c009d077eddbbdda4599db30073
Author: Lukas Reschke <lukas at owncloud.com>
Date:   Tue Nov 25 13:52:44 2014 +0100

    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
---
 apps/files_sharing/public.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index 8794e4a..1145b2c 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') {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list