summaryrefslogtreecommitdiffstats
path: root/apps/files/index.php
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-11-14 13:22:53 +0100
committerVincent Petry <pvince81@owncloud.com>2013-11-14 13:24:05 +0100
commit008c3b80d6cca6a15299afe01f150f075813df8c (patch)
tree829d7f11833253de11b2fdb1107696a1d2cbfa6d /apps/files/index.php
parentc06d8bb0071839480f9e458e58630ca0c205b9cb (diff)
downloadnextcloud-server-008c3b80d6cca6a15299afe01f150f075813df8c.tar.gz
nextcloud-server-008c3b80d6cca6a15299afe01f150f075813df8c.zip
Files app backend now normalizes paths before rendering templates
Before rendering breadcrumbs or the file list, the paths are now normalized. This prevents the UI to show "." breadcrumbs in case the path contains sections with "/./" Fixes #5848
Diffstat (limited to 'apps/files/index.php')
-rw-r--r--apps/files/index.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files/index.php b/apps/files/index.php
index f0f95b3bac8..9ae378d7a1d 100644
--- a/apps/files/index.php
+++ b/apps/files/index.php
@@ -36,6 +36,7 @@ OCP\Util::addscript('files', 'filelist');
OCP\App::setActiveNavigationEntry('files_index');
// Load the files
$dir = isset($_GET['dir']) ? stripslashes($_GET['dir']) : '';
+$dir = \OC\Files\Filesystem::normalizePath($dir);
// Redirect if directory does not exist
if (!\OC\Files\Filesystem::is_dir($dir . '/')) {
header('Location: ' . OCP\Util::getScriptName() . '');
@@ -128,7 +129,7 @@ if ($needUpgrade) {
$tmpl = new OCP\Template('files', 'index', 'user');
$tmpl->assign('fileList', $list->fetchPage());
$tmpl->assign('breadcrumb', $breadcrumbNav->fetchPage());
- $tmpl->assign('dir', \OC\Files\Filesystem::normalizePath($dir));
+ $tmpl->assign('dir', $dir);
$tmpl->assign('isCreatable', $isCreatable);
$tmpl->assign('permissions', $permissions);
$tmpl->assign('files', $files);