diff --git a/CRM/Core/Page/File.php b/CRM/Core/Page/File.php index c1f6cd10bf08..8c35a9fc07c8 100644 --- a/CRM/Core/Page/File.php +++ b/CRM/Core/Page/File.php @@ -80,7 +80,7 @@ public function run() { } $extension = CRM_Utils_File::getExtensionFromPath($path); $candidateExtensions = CRM_Utils_File::getAcceptableExtensionsForMimeType($passedInMimeType); - if (!in_array($extension, $candidateExtensions)) { + if (!in_array(strtolower($extension), array_map('strtolower', $candidateExtensions))) { throw new CRM_Core_Exception("Supplied mime-type does not match file extension"); } // Now that we have validated mime-type supplied as much as possible lets now set the MimeType variable/