mirror of https://github.com/itflow-org/itflow
Add index.php files to upload directories to prevent file traversal
This commit is contained in:
parent
2bfb50616c
commit
c5e976d995
1
post.php
1
post.php
|
|
@ -1015,6 +1015,7 @@ if(isset($_POST['add_client'])){
|
|||
|
||||
if(!file_exists("uploads/clients/$session_company_id/$client_id")) {
|
||||
mkdir("uploads/clients/$session_company_id/$client_id");
|
||||
file_put_contents("uploads/clients/$session_company_id/$client_id/index.php", "");
|
||||
}
|
||||
|
||||
//Add Location
|
||||
|
|
|
|||
|
|
@ -482,9 +482,13 @@ if(isset($_POST['add_company_settings'])){
|
|||
$config_aes_key = keygen();
|
||||
|
||||
mkdir_missing("uploads/clients/$company_id");
|
||||
file_put_contents("uploads/clients/$company_id/index.php", "");
|
||||
mkdir_missing("uploads/expenses/$company_id");
|
||||
file_put_contents("uploads/expenses/$company_id/index.php", "");
|
||||
mkdir_missing("uploads/settings/$company_id");
|
||||
file_put_contents("uploads/settings/$company_id/index.php", "");
|
||||
mkdir_missing("uploads/tmp/$company_id");
|
||||
file_put_contents("uploads/tmp/$company_id/index.php", "");
|
||||
|
||||
//Check to see if a file is attached
|
||||
if($_FILES['file']['tmp_name'] != ''){
|
||||
|
|
|
|||
Loading…
Reference in New Issue