Cool! Thank you. Well I'd be happy to send information back to the stop spam website, I believe that's what the API key is for.RMcGirr83 wrote:Not needed anymore.
Code: Select all
// Let's not ban a registrant/poster with a common IP address, who is otherwise clean
// not sure of keeping this or not...we'll see
/*if ($ck_username + $ck_email == 0)
{
$ck_ip = 0;
}*/
Code: Select all
// Let's not ban a registrant/poster with a common IP address, who is otherwise clean
// not sure of keeping this or not...we'll see
if (($ck_username + $ck_email == 0) && $ck_ip < 2)
{
$ck_ip = 0;
}
That's a good idea, as I never check username. I agree that legitimate users will be denied registration.GoBieN wrote:Might I suggest admin options to choose for check on IP, email, username or all of them?
I disabled username checking in the code, I don't think it's useful but does potentially deny user registration.
I had a user that just chose the username "Sydney" for registration and got blocked.
I'm getting this problem a lot. may I ask what you altered in the code to stop it checking against username?GoBieN wrote:
I disabled username checking in the code, I don't think it's useful but does potentially deny user registration.
I had a user that just chose the username "Sydney" for registration and got blocked.
Code: Select all
// Return the total score
$spam_score = ($ck_username + $ck_email + $ck_ip);
Code: Select all
// Let's not score the username if ip and email are clear
if ($ck_ip + $ck_email == 0)
{
$ck_username = 0;
}
Code: Select all
// Let's not ban a registrant/poster with a common IP address, who is otherwise clean
// not sure of keeping this or not...we'll see
if ($ck_username + $ck_email == 0)
{
$ck_ip = 0;
}
Code: Select all
// Let's not ban a registrant/poster with a common IP address, who is otherwise clean
// not sure of keeping this or not...we'll see
if (($ck_username + $ck_email == 0) && $ck_ip < 2)
{
$ck_ip = 0;
}
Code: Select all
// Let's not ban a registrant/poster with a common IP address, who is otherwise clean
// not sure of keeping this or not...we'll see
if ($ck_username + $ck_email == 0)
{
$ck_ip = 0;
}
Code: Select all
$ck_username = 0; // Prevent username from influencing ban decision
Code: Select all
// Return the total score
$spam_score = ($ck_username + $ck_email + $ck_ip);
Code: Select all
// ban the nub for one hour
user_ban('ip', $ip, 60, 0, false, $this->user->lang['SFS_BANNED'], $this->user->lang['SFS_BANNED']);
Code: Select all
// ban the nub for one hour
user_ban('ip', $ip, 60, 0, false, $this->user->lang['SFS_BANNED'], '');
Code: Select all
git clone --branch Dev102 https://github.com/RMcGirr83/phpBB-3.1-stopforumspam.git ext/rmcgirr83/stopforumspam/
To:Stop Forum Spam threshold:
The extension will check against a threshold (e.g., the number of times a user name, email or IP address is found within the stop forum database). You can input any number between 1 and 99. The lower the number the greater the possibility of a false positive.
I enabled guest posting (Re: Enable Guest Posting?), then inserted a test IP.Stop Forum Spam threshold:
Sets the threshold to trigger a ban (the combined total number of times a user name, email or IP address is found within the stop forum database). Input any number between 1 and 99. The lower the number the greater the possibility of a false positive.
Code: Select all
public function user_sfs_validate_posting($event)
{
Code: Select all
public function user_sfs_validate_posting($event)
{
$this->user->ip = '192.168.42.43'; // test IP
$array = $event['error'];
Code: Select all
Banned IP for reason “Found in the Stop Forum Spam database”
» 192.168.42.43
Code: Select all
Banned IP for reason “When registering: Found in the Stop Forum Spam database”
» 192.168.42.43
Code: Select all
Banned IP for reason “When posting: Found in the Stop Forum Spam database”
» 192.168.42.43
Code: Select all
Stop Forum Spam triggered:
Username: test%40example.com
IP: 192.168.42.43
Email: [email protected]
Code: Select all
Stop Forum Spam triggered when registering:
Username: test%40example.com
IP: 192.168.42.43
Email: [email protected]
Code: Select all
Stop Forum Spam triggered when posting:
Username: test%40example.com
IP: 192.168.42.43
Email: [email protected]