[CDB] Stop Forum Spam

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: [RC] Stop Forum Spam

Post by RMcGirr83 »

I have taken back this extension and have submitted it to the database on here for validation.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
User avatar
nero
Registered User
Posts: 321
Joined: Fri Mar 13, 2015 8:18 am

Re: [RC] Stop Forum Spam

Post by nero »

thx man
User avatar
TimoMF
Registered User
Posts: 10
Joined: Fri Nov 07, 2014 12:47 pm

Re: [RC] Stop Forum Spam

Post by TimoMF »

Hallo,

in the file version_101.php is a problem.
I have open an pull request.
https://github.com/TimoMF/phpBB-3.1-sto ... 2c49f52548
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: [RC] Stop Forum Spam

Post by RMcGirr83 »

Got it thanks.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
Lady_G
Registered User
Posts: 273
Joined: Fri Jun 08, 2012 12:38 pm
Location: US

Re: [RC] Stop Forum Spam

Post by Lady_G »

Thank you for this extension. I have downloaded the latest git version (1.01) and am testing as localhost. My test configuration is phpBB 3.1.4, Fedora 20, and postgreSQL.

In ext/rmcgirr83/stopforumspam/event/main_listener.php, add the $username, $ip, or $email you wish to test after:

Code: Select all

	private function stopforumspam_check($username, $ip, $email)
	{
which results in:

Code: Select all

	private function stopforumspam_check($username, $ip, $email)
	{
		
		// $ip = '176.37.33.75';	// localhost testing
		$email = '[email protected]'; // localhost testing
		
		// we need to urlencode for spaces
		$username = urlencode($username);
This example $email has 1 result in stopforumspam.com. I lowered the "Stop Forum Spam threshold:" to 1 for this test. The registration was rejected as expected.

However, the log files are recording an IP address of '216.172.135.95' for any IP address or email I test. I purged the system cache, but this error persists.

Code: Select all

Banned IP for reason “Found in the Stop Forum Spam database”
» 216.172.135.95
How can this be debugged?
Lady_G
Registered User
Posts: 273
Joined: Fri Jun 08, 2012 12:38 pm
Location: US

Re: [RC] Stop Forum Spam

Post by Lady_G »

Testing as localhost (same as my previous post), in ext/rmcgirr83/stopforumspam/language/en/acp/info_acp_stopforumspam.php I found:

Code: Select all

	'SFS_API_KEY'			=> 'Stop Forum Spam API key',
	'SFS_API_KEY_EXPLAIN'	=> 'If you want to submit spammers to the Stop Forum Spam database, input your API key from <a target="_new" href="http://www.stopforumspam.com/keys">stop forum spam</a> here.  You must be registered on the SFS website to get an API key',
	// ACP message logs
But I do not see this message anywhere in the Admin Control Panel. How are these messages intended to be used?

My board has spammers that have already registered. Can I report them using this extension?
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: [RC] Stop Forum Spam

Post by RMcGirr83 »

This is where the IP is banned

Code: Select all

				if ($this->config['sfs_ban_ip'])
				{
					$this->ban_by_ip($this->user->ip);
				}
and no you can not submit using this extension to the stop forum database.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
User avatar
GoBieN
Registered User
Posts: 546
Joined: Fri Mar 05, 2004 5:22 pm
Location: Belgium
Contact:

Re: [RC] Stop Forum Spam

Post by GoBieN »

Thanks to this extension about 25 registrations a day are blocked. :)
Keep up the excellent work.
Lady_G
Registered User
Posts: 273
Joined: Fri Jun 08, 2012 12:38 pm
Location: US

Re: [RC] Stop Forum Spam

Post by Lady_G »

RMcGirr83 wrote:This is where the IP is banned

Code: Select all

				if ($this->config['sfs_ban_ip'])
				{
					$this->ban_by_ip($this->user->ip);
				}
and no you can not submit using this extension to the stop forum database.
Yes, that works. Thank you.

I use postgreSQL, which is not as well supported as MySQL. When I see an error related to a database operation, I will try to find the cause.

The banned IP addresses appear in the ban list correctly as 1 hour bans.

Code: Select all

Reason for ban: Found in the Stop Forum Spam database
Reason shown to the banned: Found in the Stop Forum Spam database
Should 'Reason shown to the banned:' instead be blank (no message)? I don't see a need to notify a spammer. Perhaps it doesn't matter, as there is no username or email associated with a failed registration.
Lady_G
Registered User
Posts: 273
Joined: Fri Jun 08, 2012 12:38 pm
Location: US

Re: [RC] Stop Forum Spam

Post by Lady_G »

Can you please update the log file screenshot in Post #1? There is now a User log containing (example shown):

Code: Select all

Stop Forum Spam triggered:
Username: TestUser
IP: 176.37.33.75
Email: [email protected]
(The log file links are very helpful.) There is also an Admin log showing the IP block:

Code: Select all

Banned IP for reason “Found in the Stop Forum Spam database”
» 176.37.33.75
I suggest that Post #1 be clarified to explain that the username, IP address, and email are checked against the Stop Forum Spam datatabase.

If any of these entries returns a positive result, only the IP address will be blocked. The IP will be blocked for a fixed period of time.
==========

I like the temporary IP ban approach (vs. a permanent ban), as it will save the admins time from answering member emails. The spammer will get the message and leave. A legitimate member will often try again later.
Last edited by Lady_G on Sat Jun 27, 2015 2:14 am, edited 3 times in total.
Lady_G
Registered User
Posts: 273
Joined: Fri Jun 08, 2012 12:38 pm
Location: US

Re: [RC] Stop Forum Spam

Post by Lady_G »

In ext/rmcgirr83/stopforumspam/event/main_listener.php,

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;
	}
I recently was hit with several hundred spambot registrations using random username and email addresses. The registrations were about a minute apart. (A 1 hour ban will work in this situation.)

Neither the usernames nor emails appeared on Stop Forum Spam. However, the IP address hit with over 1,000 entries and I ended up banning a range of IP addresses.

I recommend removing the code.
Lady_G
Registered User
Posts: 273
Joined: Fri Jun 08, 2012 12:38 pm
Location: US

Re: [RC] Stop Forum Spam

Post by Lady_G »

Lady_G wrote:...Should 'Reason shown to the banned:' instead be blank (no message)? I don't see a need to notify a spammer. Perhaps it doesn't matter, as there is no username or email associated with a failed registration.
'Reason shown to the banned:' appears when posting:

Code: Select all

You have been banned from this board until Sat Jun 27, 2015 7:54 pm.

Please contact the Board Administrator for more information.

Reason given for ban: Found in the Stop Forum Spam database

A ban has been issued on your IP address.
I do not want to advertise how I ban spammers on my board.

Can 'Reason shown to the banned:' be left as an empty field, or perhaps made an option in the ACP?

Also consider changing the IP 60 minute ban time to a user-defined entry.

===================================

To be clear, I appreciate all of the work to develop this extension. If you disagree with these suggestions, I will still use the extension.
Lady_G
Registered User
Posts: 273
Joined: Fri Jun 08, 2012 12:38 pm
Location: US

Re: [RC] Stop Forum Spam

Post by Lady_G »

RMcGirr83 wrote:I have taken back this extension and have submitted it to the database on here for validation.
Hi,

Can you please tell me a status on the validation process?

Thanks.
User avatar
Puchahawa
Registered User
Posts: 769
Joined: Sat Jan 01, 2011 10:33 pm
Name: Randy

Re: [RC] Stop Forum Spam

Post by Puchahawa »

From what I've read it can take up to a month or so after it's submitted to be validated.
Lady_G
Registered User
Posts: 273
Joined: Fri Jun 08, 2012 12:38 pm
Location: US

Re: [RC] Stop Forum Spam

Post by Lady_G »

Thank you. I will wait for the validation process to complete.

If there is anything I can do to help, please let me know.
Locked

Return to “Extensions in Development”