summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2012-10-16 12:46:39 +0200
committerBjörn Schießle <schiessle@owncloud.com>2012-10-16 12:48:56 +0200
commitb08a1696f5a30321b0073799d6f0984daf392115 (patch)
treecdebd8f50aa705f7ef826be84ef4948ebedadc1b
parentc3823aa864938c38349d45a0524e2db3a71b2f4b (diff)
downloadnextcloud-server-b08a1696f5a30321b0073799d6f0984daf392115.tar.gz
nextcloud-server-b08a1696f5a30321b0073799d6f0984daf392115.zip
normalize path to avoid problems with trailing slashes, double-slashes, etc.
-rw-r--r--apps/files_sharing/public.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index d79f1955978..59385dd6868 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -24,12 +24,12 @@ if (isset($_GET['token'])) {
if (isset($_GET['file']) || isset($_GET['dir'])) {
if (isset($_GET['dir'])) {
$type = 'folder';
- $path = $_GET['dir'];
+ $path = OC_Filesystem::normalizePath($_GET['dir']);
$baseDir = $path;
$dir = $baseDir;
} else {
$type = 'file';
- $path = $_GET['file'];
+ $path = OC_Filesystem::normalizePath($_GET['file']);
}
$uidOwner = substr($path, 1, strpos($path, '/', 1) - 1);
if (OCP\User::userExists($uidOwner)) {