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.

Please note: The Kunena project team takes NO responsibility for maintaining nor supporting anything in this category.

Question onKunenaBeforeSave - how to prevent a message being posted?

More
2 years 9 months ago #229123 by c_schmitz
Hello,

I am currently writing a plugin which is using onKunenaBeforeSave to check the content of a message.
If he content is not approved by that check, I would like to abort the save and show a message to the user ("You are a spammer - bog off").
Showing a message is not a problem, but I don't see a clean way to abort the save? Even throwing a hard exception would still let the message save.
I am using Kunena 6.1.3.1.

Any help or insight would be very much appreciated.
 

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

More
2 years 9 months ago #229129 by xillibit
Hello,

The place github.com/Kunena/Kunena-Forum/blob/0d10...abaseObject.php#L230 where the event onKunenaBeforeSave is triggered has right a catch. It could be at some level where the exception isn't catched

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
2 years 9 months ago - 2 years 9 months ago #229135 by c_schmitz
Hello,

thank you for your kind reply.
I will check again my code.
Best regards
Carsten
Last edit: 2 years 9 months ago by c_schmitz.

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

More
2 years 8 months ago - 2 years 8 months ago #229268 by c_schmitz
I had a working way, but now the new Private Message function is throwing an error, when my plugins prevents the message of being posted. This happens because postPrivateMessage expects a $message->id which is not available, because there is no message.
Last edit: 2 years 8 months ago by c_schmitz.

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

Time to create page: 0.267 seconds