[Pkg-owncloud-commits] [owncloud] 42/67: normalize path to avoid problems with trailing slashes, double-slashes, etc.
David Prévot
taffit at alioth.debian.org
Fri Nov 8 23:10:40 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v4.5.1
in repository owncloud.
commit f06467b95b4a5f9c78ce09356ad1cc776835a4b2
Author: Björn Schießle <schiessle at owncloud.com>
Date: Tue Oct 16 12:46:39 2012 +0200
normalize path to avoid problems with trailing slashes, double-slashes, etc.
---
apps/files_sharing/public.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index e9f318e..5c0f37c 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)) {
--
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