From b116b2fd4c75cb8ddf722ae13be85bbe4eae33f3 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Sun, 24 Oct 2010 13:25:21 +0200 Subject: fix uploading files to folders with special characters in the name --- files/upload.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) mode change 100644 => 100755 files/upload.php (limited to 'files') diff --git a/files/upload.php b/files/upload.php old mode 100644 new mode 100755 index 1190b466eac..e84cf8303db --- a/files/upload.php +++ b/files/upload.php @@ -22,11 +22,9 @@ */ require_once('../inc/lib_base.php'); -// sleep(5); //immitate slow internet. - $fileName=$_FILES['file']['name']; $source=$_FILES['file']['tmp_name']; -$target=$_GET['dir'].'/'.$fileName; +$target=stripslashes($_GET['dir']).'/'.$fileName; if(isset($_SESSION['username']) and $_SESSION['username'] and strpos($_GET['dir'],'..')===false){ if(OC_FILESYSTEM::fromTmpFile($source,$target)){ echo 'true'; -- cgit v1.2.3