Kunena 7.1.1 & Kunena 6.4.17 – Security Updates Released

The Kunena team has announce the arrival of Kunena 7.1.1 [K 7.1.1] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x./6.1.x./6.2.x This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 / K7.0 and issues discovered during the last development stages of K 7.1
Just a reminder: K6.4.17 receives only securities fixes until end of 2026, so it's advised for users to upgrade to K7.1.

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

More
17 years 3 months ago #26755 by schmatzler
Just open up kunena.parser.php

and replace this:
Code:
case 'img': if($between) { static $file_ext = null; if (empty($file_ext)) { $matches = null; $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; $tempstr = kunena_htmlspecialchars($between, ENT_QUOTES); $task->autolink_disable--; # continue autolink conversion // Make sure we add image size if specified and while we are // at it also set maximum image width from text width config. // // NOTICE: image max variables from config are not intended // for formating but to limit the size of uploads, which can // be larger than the available post area to support super- // sized popups. $imgmaxsize = (int)(($fbConfig->rtewidth * 9) / 10); // 90% of text width $imgtagsize = isset($tag->options["size"]) ? (int)kunena_htmlspecialchars($tag->options["size"]) : 0; if($imgtagsize>0 && $imgtagsize<$imgmaxsize) { $imgmaxsize = $imgtagsize; } // Need to check if we are nested inside a URL code if($task->autolink_disable == 0) { $tag_new = "<a href='".$tempstr."' rel=\"lightbox\"><img src='".$tempstr.($imgtagsize ?"' width='".$imgmaxsize:'')."' style='max-width:".$imgmaxsize."px; ' alt='' /></a>"; } else { $tag_new = "<img src='".$tempstr.($imgtagsize ?"' width='".$imgmaxsize:'')."' style='max-width:".$imgmaxsize."px; ' alt='' />"; } return TAGPARSER_RET_REPLACED; } return TAGPARSER_RET_NOTHING; break;

with this:
Code:
case 'img': if($between) { $tempstr = kunena_htmlspecialchars($between, ENT_QUOTES); $task->autolink_disable--; # continue autolink conversion // Make sure we add image size if specified and while we are // at it also set maximum image width from text width config. // // NOTICE: image max variables from config are not intended // for formating but to limit the size of uploads, which can // be larger than the available post area to support super- // sized popups. $imgmaxsize = (int)(($fbConfig->rtewidth * 9) / 10); // 90% of text width $imgtagsize = isset($tag->options["size"]) ? (int)kunena_htmlspecialchars($tag->options["size"]) : 0; if($imgtagsize>0 && $imgtagsize<$imgmaxsize) { $imgmaxsize = $imgtagsize; } // Need to check if we are nested inside a URL code if($task->autolink_disable == 0) { $tag_new = "<a href='".$tempstr."' rel=\"lightbox\"><img src='".$tempstr.($imgtagsize ?"' width='".$imgmaxsize:'')."' style='max-width:".$imgmaxsize."px; ' alt='' /></a>"; } else { $tag_new = "<img src='".$tempstr.($imgtagsize ?"' width='".$imgmaxsize:'')."' style='max-width:".$imgmaxsize."px; ' alt='' />"; } return TAGPARSER_RET_REPLACED; } return TAGPARSER_RET_NOTHING; break;

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

More
17 years 3 months ago #26780 by sozzled
Here is also another example at www.kunena.com where this problem seems to have been introduced (because of K 1.5.5?):

Look at all the "img" tags in this message www.kunena.com/forum/105-solved-or-prior...ges-are-missin#12950

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

More
17 years 3 months ago #26789 by alakentu
Hello all.

I have given a small correction for this issue, see this topic: Seviye Yönetimi

It is not a final settlement but while we can help developers find a favorable solution for all. And so we do not insert above code in this new version.

Please Try it on their local servers.

Regards.

KS!
NO hacer Spam | NO esbribas todo en mayúsculas | Sigue las reglas

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

More
17 years 3 months ago #26966 by Lustikus
@all!

The solution described from alakentu is working! I tried it and the solution is simple.

Here his post:

@Fxstein.

Hello Brother.

Although it is not the appropriate forum and not the language of this forum! I saw the error and I thought well that is not strange to see images that load on the component..

I began to check and found the error within the file kunena.parser.php, in the case [img] says this:

Code:
case 'img':
if($between) {
static $file_ext = null;

if (empty($file_ext)) {
$matches = null;
$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;


I removed the [break] the piece of code and now works fine on my local forum, the truth is not well done but if you're currently serve on this error!:

Code:
case 'img':
if($between) {
static $file_ext = null;

if (empty($file_ext)) {
$matches = null;
$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));// No Break


My respect for all!


Best regards!
Lustikus

PS: for the ones, who don´t know how to edit this file i attached it. You can find it in components/com_kunena/lib!

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

  • heller
  • heller's Avatar
  • New Member
  • New Member
More
17 years 3 months ago - 17 years 3 months ago #27064 by heller
tx Lustikus.

Everything works now. :woohoo:
Last edit: 17 years 3 months ago by heller.

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

  • heller
  • heller's Avatar
  • New Member
  • New Member
More
17 years 3 months ago #27065 by heller
tx Lustikus.

Everything works now. :woohoo:

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

Time to create page: 0.124 seconds