mirror of
https://github.com/pi-hole/web.git
synced 2026-04-24 10:50:23 +01:00
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:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user