CRM-17717 - apply strtolower to file extension.
authorDave Jenkins <davej+git@circle-interactive.co.uk>
Wed, 16 Dec 2015 16:54:16 +0000 (16:54 +0000)
committerDave Jenkins <davej+git@circle-interactive.co.uk>
Wed, 16 Dec 2015 16:54:16 +0000 (16:54 +0000)
CRM/Contact/Page/ImageFile.php

index 54d39a8ecc33217da799220e0e3a5b449b6cab99..8b7cb76c6eddd0c5ffa52830b0f62ae019184194 100644 (file)
@@ -60,7 +60,7 @@ class CRM_Contact_Page_ImageFile extends CRM_Core_Page {
     }
     if ($cid) {
       $config = CRM_Core_Config::singleton();
-      $fileExtension = pathinfo($_GET['photo'], PATHINFO_EXTENSION);
+      $fileExtension = strtolower(pathinfo($_GET['photo'], PATHINFO_EXTENSION));
       $this->download(
         $config->customFileUploadDir . $_GET['photo'],
         'image/' . ($fileExtension == 'jpg' ? 'jpeg' : $fileExtension),