Kunena 7.0.6 & Kunena 6.4.12 – Security Updates Released

The Kunena team has announce the arrival of Kunena 7.0.6 [K 7.0.6] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 7.0.

The Kunena team is also pleased to announce the twelfth version of Kunena 6.4, a native Joomla extension for Joomla! 5.0, 5.1, 5.2, 5.3, 5.4 and 6.0.

Before posting new topics in this category K 1.5.x Support: Please read this first.

Question files to upload as attachments to post : filetype not recognized if in capitals

More
15 years 8 months ago #61883 by carsten888
I needed to allow upload of midi files (.mid), as attachments to posts. In the config I added ',mid' , but it would not work. Turns out the test-file had '.MID'. as soon as I changed the filename to small-caps it worked.

I tried adding '.MID' to the allowed filetypes, but that does not work.

Telling my users they have to change the file-extensions to smallcap was not an option. So I altered the file-upload to allow capital letters as such:

version: Kunena 1.5.11
file: components/com_kunena/lib/kunena.file.upload.php
line: 69
Code:
// Check for empty filename if (!is_uploaded_file($attachfile['tmp_name']) || empty($attachfile['name'])) { fileUploadError(_FILE_ERROR_EMPTY); } // check for allowed file types else if (!in_array($fileExt, $allowedArray)) { fileUploadError(_FILE_ERROR_TYPE . " " . $fbConfig->filetypes); }

change to:
Code:
$temp_file_ext = strtolower($fileExt); // Check for empty filename if (!is_uploaded_file($attachfile['tmp_name']) || empty($attachfile['name'])) { fileUploadError(_FILE_ERROR_EMPTY); } // check for allowed file types //else if (!in_array($fileExt, $allowedArray)) { else if (!in_array($temp_file_ext, $allowedArray)) { fileUploadError(_FILE_ERROR_TYPE . " " . $fbConfig->filetypes); }

This way, the file will be checked as if the extension is in small-caps, but uploaded in capital. Nicer would be if the filename was changed to smallcaps. (But I have not got time for that now ;) )

on Joomla 1.5.20

Please Log in or Create an account to join the conversation.

More
15 years 8 months ago #61939 by xillibit
Hello,

thanks for reporting this issue, i need at this.

I don't provide support by PM, because this can be useful for someone else.

Please Log in or Create an account to join the conversation.

Time to create page: 0.233 seconds