David G
Member
- Affected version
- 2.0.11
In StopForumSpam.php
It is trying to send binary version of IP
I changed to :
And it now works.
PHP:
protected function getSfsApiSubmitUrl()
{
$user = $this->user;
$ip = $user->getIp('register');
return 'https://www.stopforumspam.com/add.php'
. '?api_key=' . $this->app()->options()->stopForumSpam['apiKey']
. ($user->username ? '&username=' . urlencode($user->username) : '')
. ($user->email ? '&email=' . urlencode($user->email) : '')
. '&ip=' . urlencode($ip);
}
I changed to :
PHP:
protected function getSfsApiSubmitUrl()
{
$user = $this->user;
$ip = $user->getIp('register');
return 'https://www.stopforumspam.com/add.php'
. '?api_key=' . $this->app()->options()->stopForumSpam['apiKey']
. ($user->username ? '&username=' . urlencode($user->username) : '')
. ($user->email ? '&email=' . urlencode($user->email) : '')
. '&ip=' . urlencode(\XF\Util\Ip::convertIpBinaryToString($ip));
}
And it now works.