From b09172d20b06184a97a8a89fe5810ce22fbebfb2 Mon Sep 17 00:00:00 2001 From: Dave Jenkins Date: Wed, 16 Dec 2015 16:54:16 +0000 Subject: [PATCH] CRM-17717 - apply strtolower to file extension. --- CRM/Contact/Page/ImageFile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Contact/Page/ImageFile.php b/CRM/Contact/Page/ImageFile.php index 54d39a8ecc..8b7cb76c6e 100644 --- a/CRM/Contact/Page/ImageFile.php +++ b/CRM/Contact/Page/ImageFile.php @@ -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), -- 2.25.1