diff options
author | Björn Schießle <schiessle@owncloud.com> | 2012-10-16 12:46:39 +0200 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2012-10-16 12:48:56 +0200 |
commit | b08a1696f5a30321b0073799d6f0984daf392115 (patch) | |
tree | cdebd8f50aa705f7ef826be84ef4948ebedadc1b | |
parent | c3823aa864938c38349d45a0524e2db3a71b2f4b (diff) | |
download | nextcloud-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.php | 4 |
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)) { |