Kunena 6.2.6 released

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

Question Stop Forumspam not validate api key

More
5 years 8 months ago - 5 years 8 months ago #1 by Gamer Templates
I noticed today that after moving to Kunena 5.1 (currently 5.1.2) the API key is no longer recognized or can not be validated.

Message (when creating a USER BAN):

Error while reporting the user to stopforumspam.com. Reason given: could not validate api key



I use the key for years in Kunena and the code will show in the Stop Forum Spam User Panel displayed under API Keys. I suspect the error is in Kunena.

In the older versions of Kunena the key works fine!

This message contains confidential information

Database collation check: The collation of your table fields are correct

Joomla! SEF: Enabled | Joomla! SEF rewrite: Enabled | FTP layer: Disabled |

This message contains confidential information
htaccess: Exists | PHP environment: Max execution time: 300 seconds | Max execution memory: 100M | Max file upload: 8M

Kunena menu details:

Warning: Spoiler!

Joomla default template details : ja_playstore | author: JoomlArt.com | version: 1.0.8 | creationdate: June 8, 2018

Kunena default template details : Crypsisb3 | author: Kunena Team | version: 5.1.2 | creationdate: 2018-07-15

Kunena template params:

Warning: Spoiler!

Kunena version detailed: Kunena 5.1.2 | 2018-07-15 [ Charon ]
| Kunena detailed configuration:

Warning: Spoiler!
| Kunena integration settings:
Warning: Spoiler!
| Joomla! detailed language files installed:
Warning: Spoiler!

Third-party components: None

Third-party SEF components: None

Plugins: Search - Kunena Search 5.1.1

Modules: Kunena Latest 5.1.1 | Kunena Stats 5.1.1 | Kunena Login 5.1.1

Last edit: 5 years 8 months ago by Gamer Templates.
The following user(s) said Thank You: ssnobben

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

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

Can-you check please if in Kunena configuration settings the api key for stop forum spam is still here ?

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
5 years 8 months ago - 5 years 8 months ago #3 by Gamer Templates
That was my first way :-)



There is also an error in the german translation. But this is not the problem :-)

I create a new key at Stop Forum Spam. Same error!
Last edit: 5 years 8 months ago by Gamer Templates.

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

More
5 years 8 months ago #4 by xillibit
It could be an issue when Kunena isn't able to contact stopforumspamservice, in your php.ini do-you have fopen or curl enabled ? Or both ?

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
5 years 8 months ago - 5 years 8 months ago #5 by Gamer Templates
I change nothing in my settings. In Kunena 4.x this works great. In Kunena 5.x donĀ“t!

When i disable allow_url_fopen i get: Cannot use a stream transport when "allow_url_fopen" is disabled.

Last edit: 5 years 8 months ago by Gamer Templates.

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

More
5 years 8 months ago #6 by purezen
I experienced the exact same problem last week, with Kunena 5.1.2.
Stop Forum Spam has worked perfectly for many years in Kunena.
I assumed that the Stop Forum Spam website had stopped working properly, because I hadn't changed any settings in Kunena and my API key was still there and valid.

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

More
5 years 8 months ago - 5 years 8 months ago #7 by Gamer Templates
I check with my hosting the server settings. All server settings OK. We think the problem is in the Kunena file!

But i do not find any wrong code line here:
Code:
/** * Reports a user to stopforumspam.com * * @param $userid * * @return boolean * @since Kunena */ protected function report($userid) { if (!$this->config->stopforumspam_key || !$userid) { return false; } $spammer = Factory::getUser($userid); $db = Factory::getDBO(); $db->setQuery("SELECT ip FROM #__kunena_messages WHERE userid=" . $userid . " GROUP BY ip ORDER BY `time` DESC", 0, 1); $ip = $db->loadResult(); // Check if mail adress is valid before to send the report $options = new \Joomla\Registry\Registry; $transport = new \Joomla\CMS\Http\Transport\StreamTransport($options); // Create a 'stream' transport. $http = new \Joomla\CMS\Http\Http($options, $transport); $data = "username[]=" . $spammer->username . "&ip_addr[]=" . $ip . "&email[]=" . $spammer->email . "&api_key[]=" . $this->config->stopforumspam_key; $response = $http->post('https://api.stopforumspam.com/add', $data); if ($response->code == '200') { // Report accepted. There is no need to display the reason $this->app->enqueueMessage(JText::_('COM_KUNENA_STOPFORUMSPAM_REPORT_SUCCESS')); return true; } else { // Report failed or refused $reasons = array(); preg_match('/<p>.*<\/p>/', $response->body, $reasons); // Stopforumspam returns only one reason, which is reasons[0], but we need to strip out the html tags before using it $this->app->enqueueMessage(JText::sprintf('COM_KUNENA_STOPFORUMSPAM_REPORT_FAILED', strip_tags($reasons[0])), 'error'); return false; } }
Last edit: 5 years 8 months ago by Gamer Templates.

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

More
5 years 7 months ago - 5 years 7 months ago #8 by purezen
Every spam post I have reported for last couple of weeks has failed.
It definitely appears that something has become broken in latest Kunena build.

Does this function interact with custom Kunena Templates ?
I am using an up-to-date 9themestore template.
OR
Is does this function have nothing to do with the template design you use ?

Attachments:
Last edit: 5 years 7 months ago by purezen.

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

More
5 years 7 months ago - 5 years 7 months ago #9 by Gamer Templates

purezen wrote: Does this function interact with custom Kunena Templates ?
I am using an up-to-date 9themestore template.
OR
Is does this function have nothing to do with the template design you use ?


I use for testing Crypsis 3 (Kunena Template) original. Same problem! The TEMPLATE is not the problem (custom or not)!

The only thing you can do is: fopen and/or curl enabled in your php.ini (i have both enabled)
Last edit: 5 years 7 months ago by Gamer Templates.
The following user(s) said Thank You: purezen

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

More
5 years 7 months ago #10 by purezen

templatesROYAL wrote:

purezen wrote: The only thing you can do is: fopen and/or curl enabled in your php.ini (i have both enabled)


I already have both of these enabled on the server.

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

Time to create page: 0.519 seconds