Detect mime type of uploaded file on the server instead of relying on what the uploading OS tells us. Fixes #395

This commit is contained in:
DL6ER
2017-02-09 16:21:21 +01:00
parent cb6e7f8157
commit b8d6550096

View File

@@ -63,7 +63,7 @@ if($_POST["action"] == "in")
{
$filename = $_FILES["zip_file"]["name"];
$source = $_FILES["zip_file"]["tmp_name"];
$type = $_FILES["zip_file"]["type"];
$type = mime_content_type($source);
$name = explode(".", $filename);
$accepted_types = array('application/zip', 'application/x-zip-compressed', 'multipart/x-zip', 'application/x-compressed');