diff options
author | Tom Needham <needham.thomas@gmail.com> | 2012-04-15 15:09:54 +0000 |
---|---|---|
committer | Tom Needham <needham.thomas@gmail.com> | 2012-04-15 15:09:54 +0000 |
commit | b0e68d039c17c26013460f890c148595652b5376 (patch) | |
tree | ef3c4149316a9edbb8f1651315116e39878cba5a /files/ajax | |
parent | 712e25bb02518f353edddc5e9acbb56b80e2affb (diff) | |
parent | a0d917fe98efbb11905f7ddd12169e3675690555 (diff) | |
download | nextcloud-server-b0e68d039c17c26013460f890c148595652b5376.tar.gz nextcloud-server-b0e68d039c17c26013460f890c148595652b5376.zip |
Merge branch 'master' of gitorious.org:owncloud/owncloud
Diffstat (limited to 'files/ajax')
-rw-r--r-- | files/ajax/upload.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/files/ajax/upload.php b/files/ajax/upload.php index af7a7acf702..76ea65fe933 100644 --- a/files/ajax/upload.php +++ b/files/ajax/upload.php @@ -47,7 +47,8 @@ $result=array(); if(strpos($dir,'..') === false){ $fileCount=count($files['name']); for($i=0;$i<$fileCount;$i++){ - $target=stripslashes($dir) . $files['name'][$i]; + // $target=stripslashes($dir) . $files['name'][$i]; + $target = OC_Helper::buildNotExistingFileName(stripslashes($dir), $files['name'][$i]); if(is_uploaded_file($files['tmp_name'][$i]) and OC_Filesystem::fromTmpFile($files['tmp_name'][$i],$target)){ $meta=OC_FileCache::getCached($target); $result[]=array( "status" => "success", 'mime'=>$meta['mimetype'],'size'=>$meta['size'],'name'=>$files['name'][$i]); |