×
Blue Eagle (1.5.0) for K5.1 is released (20 Jul 2018)

Please update the Kunena Blue Eagle to 1.5.0 if you use Kunena 5.1.
We made several bug fixes and improvements. Also Blue Eagle has now all the features from Crypsis.
Download: www.kunena.org/download/templates/category/blue-eagle-5

Question Stop Forumspam not validate api key

More
1 week 1 day ago - 1 week 1 day ago #1 by templatesROYAL
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! [ Click to expand ]

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! [ Click to expand ]

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

Warning: Spoiler! [ Click to expand ]
| Kunena integration settings:
Warning: Spoiler! [ Click to expand ]
| Joomla! detailed language files installed:
Warning: Spoiler! [ Click to expand ]

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: 1 week 1 day ago by templatesROYAL.

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

More
1 week 1 day 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
1 week 1 day ago - 1 week 1 day ago #3 by templatesROYAL
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: 1 week 1 day ago by templatesROYAL.

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

More
1 week 1 day 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
4 days 18 hours ago - 3 days 17 hours ago #5 by templatesROYAL
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: 3 days 17 hours ago by templatesROYAL.

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

More
1 day 8 minutes 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
16 hours 54 minutes ago - 14 hours 49 minutes ago #7 by templatesROYAL
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: 14 hours 49 minutes ago by templatesROYAL.

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

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