mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 12:20:44 +02:00
Fixes #4017 - "Bad File Detected" when uppercase extension used on image.
This commit is contained in:
@@ -1951,6 +1951,8 @@ class e_file
|
|||||||
// 1. Start by checking against filetypes - that's the easy one!
|
// 1. Start by checking against filetypes - that's the easy one!
|
||||||
$file_ext = pathinfo($target_name, PATHINFO_EXTENSION);
|
$file_ext = pathinfo($target_name, PATHINFO_EXTENSION);
|
||||||
|
|
||||||
|
$file_ext = strtolower($file_ext);
|
||||||
|
|
||||||
// 2. For all files, read the first little bit to check for any flags etc
|
// 2. For all files, read the first little bit to check for any flags etc
|
||||||
$res = fopen($filename, 'rb');
|
$res = fopen($filename, 'rb');
|
||||||
$tstr = fread($res, 2048);
|
$tstr = fread($res, 2048);
|
||||||
|
Reference in New Issue
Block a user