--- download.php.orig 2015-12-11 13:09:29.935129148 +0000 +++ download.php 2015-12-11 13:10:49.076879198 +0000 @@ -104,8 +104,8 @@ // check the file extension when frontend upload if ($files['tmp_name']['file_upload'] != '' || $files['name']['file_upload'] != ''){ $file_extension = JFile::getExt($files['name']['file_upload']); - $user_file_types = explode(',',$user_rules->uploads_allowed_types); - if (!in_array($file_extension, $user_file_types)){ + $user_file_types = explode(',',strtolower($user_rules->uploads_allowed_types)); + if (!in_array(strtolower($file_extension), $user_file_types)){ // error - user have tried to upload a not allowed file type $this->setError(JText::_('COM_JDOWNLOADS_BACKEND_FILESEDIT_INVALID_FILE_TYPE')); return false; @@ -441,9 +441,9 @@ $this->extern_file = ''; $this->extern_site = ''; // set file extension pic - $filepfad = JPATH_SITE.'/images/jdownloads/fileimages/'.$file_extension.'.png'; - if(JFile::exists(JPATH_SITE.'/images/jdownloads/fileimages/'.$file_extension.'.png')){ - $this->file_pic = $file_extension.'.png'; + $filepfad = JPATH_SITE.'/images/jdownloads/fileimages/'.strtolower($file_extension).'.png'; + if(JFile::exists(JPATH_SITE.'/images/jdownloads/fileimages/'.strtolower($file_extension).'.png')){ + $this->file_pic = strtolower($file_extension).'.png'; } else { $this->file_pic = $jlistConfig['file.pic.default.filename']; } @@ -462,7 +462,7 @@ } // create thumbs form pdf - if ($jlistConfig['create.pdf.thumbs'] && $file_extension == 'pdf'){ + if ($jlistConfig['create.pdf.thumbs'] && strtolower($file_extension) == 'pdf'){ $thumb_path = JPATH_SITE.'/images/jdownloads/screenshots/thumbnails/'; $screenshot_path = JPATH_SITE.'/images/jdownloads/screenshots/'; $pdf_thumb_name = jdownloadsHelper::create_new_pdf_thumb($target_path, $only_name, $thumb_path, $screenshot_path);