From e09533659acd39634d5cd7227df5acc603f4d72d Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Thu, 22 Oct 2015 08:44:55 +0100 Subject: [PATCH] Close the mime checker after use --- build/index.php | 1 + module_index.json | 2 +- modules/feature-upload.php | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build/index.php b/build/index.php index 761556c..49ee656 100644 --- a/build/index.php +++ b/build/index.php @@ -1282,6 +1282,7 @@ register_module([ $mimechecker = finfo_open(FILEINFO_MIME_TYPE); $mime_type = finfo_file($mimechecker, $temp_filename); + finfo_close($mimechecker); // Perform appropriate checks based on the *real* filetype switch(substr($mime_type, 0, strpos($mime_type, "/"))) diff --git a/module_index.json b/module_index.json index 0c11324..c832787 100644 --- a/module_index.json +++ b/module_index.json @@ -50,7 +50,7 @@ "author": "Starbeamrainbowlabs", "description": "Adds the ability to upload files to Pepperminty Wiki. Uploaded files act as pages and have the special 'File:' prefix.", "id": "feature-upload", - "lastupdate": 1445499784, + "lastupdate": 1445499882, "optional": false }, { diff --git a/modules/feature-upload.php b/modules/feature-upload.php index acb9bbe..1657dd4 100644 --- a/modules/feature-upload.php +++ b/modules/feature-upload.php @@ -64,6 +64,7 @@ register_module([ $mimechecker = finfo_open(FILEINFO_MIME_TYPE); $mime_type = finfo_file($mimechecker, $temp_filename); + finfo_close($mimechecker); // Perform appropriate checks based on the *real* filetype switch(substr($mime_type, 0, strpos($mime_type, "/")))