1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-30 19:30:25 +02:00

Fixes #4017 - "Bad File Detected" when uppercase extension used on image.

This commit is contained in:
Cameron
2019-12-10 11:35:08 -08:00
parent 3087826ee9
commit ef4f34d223

View File

@@ -1951,6 +1951,8 @@ class e_file
// 1. Start by checking against filetypes - that's the easy one!
$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
$res = fopen($filename, 'rb');
$tstr = fread($res, 2048);