Kunena 6.3.0 released

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

Topics that are moved into this category are generally considered to be closed. Users may want to add additional information but these topics should not be resurrected in order to discuss new problems or unrelated matters.

Question IMG Tag problem after upgrade to Kunena 1.5.5 PROPER

More
14 years 8 months ago #1 by jerry
Just back from my holiday. I am seeing inproper fix for this issue. Actually in Kunena 1.5.5 devs tried to check file extension. Both modifications from users are wrong as they disable this check.
Proper solution is:
/components/com_kunena/lib/kunena.parser.php lines: 345-348
before:
Code:
$file_ext = explode(',', $params->get('upload_extensions')); preg_match('/\.([\w\d]+)$/', $between, $matches); } if (!in_array(strtolower($matches[1]), $file_ext)) break;

after:
Code:
$file_ext = explode(',', $params->get('upload_extensions')); } preg_match('/\.([\w\d]+)$/', $between, $matches); if (!in_array(strtolower($matches[1]), $file_ext)) break;

HaND, Jerry

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

More
14 years 8 months ago #2 by xillibit
Hello,

Thanks for sharing this, I will transmit this to the DEVs.

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.

More
14 years 7 months ago #3 by mjanzen128
Oh, thanks for the info. I was wondering myself why IMG tags werent working on 1.5.5. Thanks a ton!

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

More
14 years 7 months ago #4 by deso
Thanks for sharing, I was about to drop myself dead after seeing all the pictures gone in my board.

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

More
14 years 7 months ago #5 by Matias
Thanks Jerry for your fix.

BTW: Also line containing $matches = null; should go outside of that if clause (fixes a notice).

Sorry about the new bug -- we had bad security issues with existing exploits and we had to fix those as soon as possible. We didn't have enough time to test them well enough..

New release which fixes the new regression bugs will come in few days.

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

More
14 years 7 months ago #6 by kmilos
Just out of curiosity (not a PHP coder): how come this code needs to go outside that if block, isn't that if block going to be executed every time since $file_ext is being initialized to null just above?

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

More
14 years 7 months ago #7 by Matias
empty($file_ext) is true only if $file_ext is null, '' or 0. It is defined to be static (= keeps its value), so if block will get executed only once.

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

More
14 years 7 months ago #8 by Ganzuelo
Matias can we get a copy of this whole code we need to fix.. I stink at php.. only good at copy and pasting in the set position?

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

More
14 years 7 months ago - 14 years 7 months ago #9 by Matias
Jerry's code works, it may just show a notice for undefined variable (if notices are turned on).

The whole code looks like this:

/components/com_kunena/lib/kunena.parser.php lines: 340 ->
Code:
static $file_ext = null; $matches = null; if (empty($file_ext)) { $params = &JComponentHelper::getParams( 'com_media' ); $file_ext = explode(',', $params->get('upload_extensions')); } preg_match('/\.([\w\d]+)$/', $between, $matches); if (!in_array(strtolower($matches[1]), $file_ext)) break;
Last edit: 14 years 7 months ago by Matias.

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

More
14 years 7 months ago - 14 years 7 months ago #10 by Ganzuelo
Its working now thanks!
Last edit: 14 years 7 months ago by Ganzuelo. Reason: reread and fixed..

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

Time to create page: 0.518 seconds