fixed vilnerability with filename incidents

This commit is contained in:
marcos 2020-08-11 09:11:37 +02:00
parent 9b3909e5d0
commit 41249220df
1 changed files with 2 additions and 2 deletions

View File

@ -137,11 +137,11 @@ if (isset($_GET['id'])) {
}
// Upload file
if ((check_acl($config['id_user'], $id_grupo, 'IW') == 1) and isset($_GET['upload_file']) and ($_FILES['userfile']['name'] != '')) {
if ((check_acl($config['id_user'], $id_grupo, 'IW') == 1) && isset($_GET['upload_file']) && ($_FILES['userfile']['name'] != '')) {
$description = get_parameter('file_description', __('No description available'));
// Insert into database
$filename = io_safe_input($_FILES['userfile']['name']);
$filename = strip_tags(io_safe_input($_FILES['userfile']['name']), '<br>');
$filesize = io_safe_input($_FILES['userfile']['size']);
// The following is if you have clamavlib installed