Skip to content

Commit

Permalink
Add disable_dangerous_file in unzip_uploaded_file
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed May 17, 2021
1 parent a2fabca commit 2e5c004
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main/inc/lib/fileUpload.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1081,6 +1081,8 @@ function unzip_uploaded_file($uploaded_file, $upload_path, $base_work_dir, $max_
}

$safe_file = api_replace_dangerous_char($file);
$safe_file = disable_dangerous_file($safe_file);

@rename($base_work_dir.$upload_path.'/'.$file, $base_work_dir.$upload_path.'/'.$safe_file);
set_default_settings($upload_path, $safe_file, $filetype);
}
Expand Down

0 comments on commit 2e5c004

Please sign in to comment.