Disallow traversing to parent dir

This commit is contained in:
Matt Pass
2013-01-15 11:54:12 +00:00
parent 4da7024f91
commit 0c4741c793

View File

@@ -98,7 +98,7 @@ if ($_GET['action']=="upload") {
class fileUploader {
public function __construct($uploads) {
global $docRoot;
$uploadDir=$docRoot.$iceRoot.str_replace("|","/",strClean($_POST['folder'])."/");
$uploadDir=$docRoot.$iceRoot.str_replace("..","",str_replace("|","/",strClean($_POST['folder'])."/"));
foreach($uploads as $current) {
$this->uploadFile=$uploadDir.$current->name;
$fileName = $current->name;