diff options
author | Morris Jobke <hey@morrisjobke.de> | 2014-11-25 10:09:16 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-11-25 10:09:16 +0100 |
commit | 6fb2477fb75d4c982a1568e2392d17fd7cc2fd4b (patch) | |
tree | 084512c823057b7afeffaeeccfa0fa77afea5bb7 /apps | |
parent | bc3c835f6acacd00c1373b148e76c965081c829c (diff) | |
parent | a6ebb176102fcb157c529685cbaeb358950a054a (diff) | |
download | nextcloud-server-6fb2477fb75d4c982a1568e2392d17fd7cc2fd4b.tar.gz nextcloud-server-6fb2477fb75d4c982a1568e2392d17fd7cc2fd4b.zip |
Merge pull request #12262 from owncloud/removeAbsoluteDirectoryPathFromTemplate
Don't disclose relative directory path for single shared files of user
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/lib/controllers/sharecontroller.php | 4 | ||||
-rw-r--r-- | apps/files_sharing/public.php | 2 | ||||
-rw-r--r-- | apps/files_sharing/tests/controller/sharecontroller.php | 2 |
3 files changed, 3 insertions, 5 deletions
diff --git a/apps/files_sharing/lib/controllers/sharecontroller.php b/apps/files_sharing/lib/controllers/sharecontroller.php index 71b5ab7f8c8..076df3c46f6 100644 --- a/apps/files_sharing/lib/controllers/sharecontroller.php +++ b/apps/files_sharing/lib/controllers/sharecontroller.php @@ -23,7 +23,6 @@ use OCP\AppFramework\Controller; use OCP\IRequest; use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Http\RedirectResponse; -use OCP\AppFramework\IApi; use OC\URLGenerator; use OC\AppConfig; use OCP\ILogger; @@ -159,7 +158,6 @@ class ShareController extends Controller { $originalSharePath .= $path; } - $dir = dirname($originalSharePath); $file = basename($originalSharePath); $shareTmpl = array(); @@ -171,7 +169,7 @@ class ShareController extends Controller { $shareTmpl['sharingToken'] = $token; $shareTmpl['server2serversharing'] = Helper::isOutgoingServer2serverShareEnabled(); $shareTmpl['protected'] = isset($linkItem['share_with']) ? 'true' : 'false'; - $shareTmpl['dir'] = $dir; + $shareTmpl['dir'] = ''; $shareTmpl['fileSize'] = \OCP\Util::humanFileSize(\OC\Files\Filesystem::filesize($originalSharePath)); // Show file list diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index d9b8f0f4f30..d9d14f67c33 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -12,6 +12,6 @@ $urlGenerator = new \OC\URLGenerator(\OC::$server->getConfig()); $token = isset($_GET['t']) ? $_GET['t'] : ''; -$route = isset($_GET['download']) ? 'files_sharing.sharecontroller.downloadshare' : 'files_sharing.sharecontroller.showshare'; +$route = isset($_GET['download']) ? 'files_sharing.sharecontroller.downloadShare' : 'files_sharing.sharecontroller.showShare'; OC_Response::redirect($urlGenerator->linkToRoute($route, array('token' => $token))); diff --git a/apps/files_sharing/tests/controller/sharecontroller.php b/apps/files_sharing/tests/controller/sharecontroller.php index 8dcb2475564..f13e5b2e497 100644 --- a/apps/files_sharing/tests/controller/sharecontroller.php +++ b/apps/files_sharing/tests/controller/sharecontroller.php @@ -153,7 +153,7 @@ class ShareControllerTest extends \PHPUnit_Framework_TestCase { 'sharingToken' => $this->token, 'server2serversharing' => true, 'protected' => 'true', - 'dir' => '/', + 'dir' => '', 'downloadURL' => null, 'fileSize' => '33 B' ); |