Skip to content

Commit

Permalink
Deploy path traversal fix
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jan 25, 2023
1 parent dd1ba67 commit ae8ee64
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tinyfilemanager.php
Expand Up @@ -1065,6 +1065,15 @@ function get_file_path () {
}

$files = $_POST['file'];
$sanitized_files = array();

// clean path
foreach($files as $file){
array_push($sanitized_files, fm_clean_path($file));
}

$files = $sanitized_files;

if (!empty($files)) {
chdir($path);

Expand Down

0 comments on commit ae8ee64

Please sign in to comment.