- Posts: 47
- Thank you received: 1
Kunena 7.0.2 Released
The Kunena team has announce the arrival of Kunena 7.0.2 [K 7.0.2] in stable which is now available for download as a native Joomla extension for J! 5.3.x/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
Question Avatar size exceed limit allowed by configuration
indeed, I have the same issue and followed Kallehak's steps and it seems to be OK, so far.
However, I do not understand why this worked in 5.0.14, where the code in this respect is identical....:dry:
Please Log in or Create an account to join the conversation.
I don't know, that sounds to me like the actual problem is somewhere else.unker wrote: However, I do not understand why this worked in 5.0.14, where the code in this respect is identical....:dry:
With the update to 5.1.1, nothing changed for me sadly
Please Log in or Create an account to join the conversation.
With that you can never check if the avatar size exceed the limits set in configurationKallehak wrote: I checked libraries/kuena/upload/upload.php and found that the functions:
checkFileSizeAvatar
checkFileSizeFileAttachment
checkFileSizeImageAttachment
did return 0 when a file/image were not bigger than allowed. So I changed:
return (int) max(
0,
min(
$this->toBytes(ini_get('upload_max_filesize')) - 1024,
$this->toBytes(ini_get('post_max_size')) - 1024,
$this->toBytes(ini_get('memory_limit')) - 1024 * 1024
)
);
to:
return true;
in the functions and now it works
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.
you are absolutely right.
So we have the choice:
no avatars, attachments and images
or
no size control...
...as long as nothing will be corrected
Best Regards
Hartmut
Please Log in or Create an account to join the conversation.
xillibit wrote:
With that you can never check if the avatar size exceed the limits set in configurationKallehak wrote: [...]
in the functions and now it works
Actually the check are made. The function returns FALSE if the size exceeds the limit set in configuration. Problem was/is that the function returns 0 which is the same as false when the size did not exceed the limit. Looks like this return code is not in use anymore as originally intended I suppose.
Please Log in or Create an account to join the conversation.