×
Blue Eagle 5 v1.6.2 has been Released for Kunena 5.2 (20 Jan 2021)

The Kunena team has announce the arrival of Kunena template Blue Eagle 5 v1.6.2 which is now available for download. This version addresses most of the issues that were discovered in development.

REQUIREMENTS
Blue Eagle 1.6.x requires Kunena 5.2.x to work with

Question Stop Forumspam not validate api key

More
2 years 7 months ago - 2 years 7 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: 2 years 7 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
2 years 7 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
2 years 7 months ago - 2 years 7 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: 2 years 7 months ago by Gamer Templates.

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

More
2 years 6 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
2 years 6 months ago - 2 years 6 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: 2 years 6 months ago by Gamer Templates.

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

More
2 years 6 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
2 years 6 months ago - 2 years 6 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:
/**
	 * 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: 2 years 6 months ago by Gamer Templates.

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

More
2 years 6 months ago - 2 years 6 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: 2 years 6 months ago by purezen.

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

More
2 years 6 months ago - 2 years 6 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: 2 years 6 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
2 years 6 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.

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Time to create page: 0.577 seconds