OC_JSON::checkLoggedIn();
// Get data
-$dir = $_GET["dir"];
-$files = isset($_GET["file"]) ? $_GET["file"] : $_GET["files"];
+$dir = stripslashes($_GET["dir"]);
+$files = isset($_GET["file"]) ? stripslashes($_GET["file"]) : stripslashes($_GET["files"]);
$files = explode(';', $files);
$filesWithError = '';
OC_JSON::checkLoggedIn();
// Get data
-$dir = $_GET["dir"];
-$file = $_GET["file"];
-$target = $_GET["target"];
+$dir = stripslashes($_GET["dir"]);
+$file = stripslashes($_GET["file"]);
+$target = stripslashes($_GET["target"]);
if(OC_Files::move($dir,$file,$target,$file)){
OC_JSON::checkLoggedIn();
// Get the params
-$dir = isset( $_GET['dir'] ) ? $_GET['dir'] : '';
-$filename = isset( $_GET['filename'] ) ? $_GET['filename'] : '';
+$dir = isset( $_GET['dir'] ) ? stripslashes($_GET['dir']) : '';
+$filename = isset( $_GET['filename'] ) ? stripslashes($_GET['filename']) : '';
$content = isset( $_GET['content'] ) ? $_GET['content'] : '';
if($filename == '') {
}
-OC_JSON::error(array("data" => array( "message" => "Error when creating the file" )));
\ No newline at end of file
+OC_JSON::error(array("data" => array( "message" => "Error when creating the file" )));
OC_JSON::checkLoggedIn();
// Get the params
-$dir = isset( $_GET['dir'] ) ? $_GET['dir'] : '';
-$foldername = isset( $_GET['foldername'] ) ? $_GET['foldername'] : '';
+$dir = isset( $_GET['dir'] ) ? stripslashes($_GET['dir']) : '';
+$foldername = isset( $_GET['foldername'] ) ? stripslashes($_GET['foldername']) : '';
if(trim($foldername) == '') {
OC_JSON::error(array("data" => array( "message" => "Empty Foldername" )));
exit();
}
-if(OC_Files::newFile($dir, $foldername, 'dir')) {
+if(OC_Files::newFile($dir, stripslashes($foldername), 'dir')) {
OC_JSON::success(array("data" => array()));
exit();
}
OC_JSON::checkLoggedIn();
// Get data
-$dir = $_GET["dir"];
-$file = $_GET["file"];
-$newname = $_GET["newname"];
+$dir = stripslashes($_GET["dir"]);
+$file = stripslashes($_GET["file"]);
+$newname = stripslashes($_GET["newname"]);
// Delete
if( OC_Files::move( $dir, $file, $dir, $newname )) {
}
OC_App::setActiveNavigationEntry( "files_index" );
// Load the files
-$dir = isset( $_GET['dir'] ) ? $_GET['dir'] : '';
+$dir = isset( $_GET['dir'] ) ? stripslashes($_GET['dir']) : '';
// Redirect if directory does not exist
if(!OC_Filesystem::is_dir($dir)) {
header("Location: ".$_SERVER['PHP_SELF']."");