From edcb69601878d93d312f1f85ffd64491cca4fe52 Mon Sep 17 00:00:00 2001 From: Jared Hancock <gravydish@gmail.com> Date: Mon, 15 Dec 2014 12:24:20 -0600 Subject: [PATCH] Ensure case-insensitive file extension comparison Ensure that when generating the list of acceptable file extensions, that the list is lower cased, because the extension from the filename will be lower-cased before attempting to find the extension in the list of acceptable extensions. --- include/class.forms.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/class.forms.php b/include/class.forms.php index 1fc40ffeb..cdc785904 100644 --- a/include/class.forms.php +++ b/include/class.forms.php @@ -1587,6 +1587,10 @@ class FileUploadField extends FormField { else { if ($ext[0] != '.') $ext = '.' . $ext; + + // Ensure that the extension is lower-cased for comparison latr + $ext = strtolower($ext); + // Add this to the MIME types list so it can be exported to // the @accept attribute if (!isset($extensions[$ext])) -- GitLab