[TAC] Stop Country Spam

[TAC] Stop Country Spam [Paid] 3.1.5

No permission to buy ($19.00)
well.. I was planinig to log the events in the admin control panel (wouldn't this be better?)
I'll add that to the to do list (1st post on this thread)
 
Many thanks for the update

Do we still need the white List option? removing the tick from the tick box then hit save button will white list the country with no need to choose the radio button of the white list option

Log "Stop Country Spam" events in the ACP is not included in v1.0.3?

May i know from which file which line i can edit the country list font type and size and the the background color?
 
White listing and black listing are two different types:

From wiki:
A whitelist is a list or register of entities that, for one reason or another, are being provided a particular privilege
A blacklist (or black list) is a list or register of entities who, for one reason or another, are being denied a particular privilege

From me:
So, if you want to stop everyone from registering except the UK (for example).. the you could either:
1) Just select the UK and select the white list options
or
2) Select everyone apart from the UK and select the black list option

What the white list option really does extra.. is that if an IP address (for what ever reason) can not be identified with a country code, then they wont be let through the registration
However, this could be regarded as a negative side of the white list (some legitimate people might not be able to register with this option).

It is safer (for legitimate users) to use the black list option

The white list option is there to make it easier to prevent registration from everyone (except a few), and also be "strict" about the registration (unknowns cant register)
The black list option is there to make it easier to prevent registration from a few countries, and also less be "strict" about the registration (unknowns can register)

Logs will come in the next version (looking at it now ;) )
 
Thanks, let me know if you need anything else.

The plugin is simple and does what it says.

It's fairly complete for what it does, it should even be useable years in the future from now (that's if later versions of XF don't vastly change the registration)
And if an IP database is ever out of date / goes down years in the future from now, you can always point to another site to do the IP address look up (see JSON responses here)
 
Hello tenants

when i try to uninstall the add-on i get this error:

Code:
Server Error
 
Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''sf_stopcountryspam_iso3166_codes', 'sf_stopcountryspam_log'' at line 2
1.Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
2.Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
3.Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
4.Zend_Db_Adapter_Abstract->query() in StopCountrySpam/Install.php at line 301
5.StopCountrySpam_Install::uninstallCode()
6.call_user_func() in XenForo/DataWriter/AddOn.php at line 193
7.XenForo_DataWriter_AddOn->_postDelete() in XenForo/DataWriter.php at line 1738
8.XenForo_DataWriter->delete() in XenForo/ControllerAdmin/AddOn.php at line 116
9.XenForo_ControllerAdmin_AddOn->actionDelete() in XenForo/FrontController.php at line 310
10.XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
11.XenForo_FrontController->run() in /home/coder/public_html/community/admin.php at line 13
 
To uninstall to can just replace this file with the version 1.0.5 : \library\StopCountrySpam\Install.php
 
I deleted 1.0.4 folder then uploaded 1.0.6 then made upgrade and still have this error when try to uninstall the add-on

Code:
Server Error
 
Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''sf_stopcountryspam_iso3166_codes'' at line 2
1.Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
2.Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
3.Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
4.Zend_Db_Adapter_Abstract->query() in StopCountrySpam/Install.php at line 300
5.StopCountrySpam_Install::uninstallCode()
6.call_user_func() in XenForo/DataWriter/AddOn.php at line 193
7.XenForo_DataWriter_AddOn->_postDelete() in XenForo/DataWriter.php at line 1738
8.XenForo_DataWriter->delete() in XenForo/ControllerAdmin/AddOn.php at line 116
9.XenForo_ControllerAdmin_AddOn->actionDelete() in XenForo/FrontController.php at line 310
10.XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
11.XenForo_FrontController->run() in /home/coder/public_html/community/admin.php at line 13
 
Now every thing is working fine with no errors: installation, uninstallation, functions :)

I see in the event log:
generated by username attempt: smishenia
IP Address: 127.255.255.255

He was blocked from registration How did he got a username ?
 
That's was a user name attempt.

This user went to the sign up button (or simulated it with a bot) and then entered a user name
On clicking "No, Create an account now => Sign up" this user name is the sent to the registration page

The country location is checked => They are prevented from registering

The "generated by username attempt" smishenia is logged (this will also work if they attempt to do this using an email address)

It's often useful, because you can search the IP address and username to find out that you were right to block this user

That IP address is in the reserved range (so should have no country specified with it), are you using black listing or white listing?

I believe that IP address is logged incorrectly (and due to this), I'm actually changing how the IP address is stored now. What was the rest of the log (click the log and it gives you more detail that you can paste, and should also tell you the real IP from the request URL)

The plug-in not quite completely working fine, I've still seen some issues when a user tries to register with IPv6 internet addresses (IPv6 seems to be mostly from Russia and China, and are not yet supported in XF). An error is thrown if they are from a black listed country and this plugin tries to log the data... I'm looking at a fix now, and a way to log the attempt.
(its only an error for those that are blacklisted anyway, and I believe will also be fixed by changing the column type of the ip_address)
 
That's was a user name attempt.

This user went to the sign up button (or simulated it with a bot) and then entered a user name
On clicking "No, Create an account now => Sign up" this user name is the sent to the registration page

Ok, thanks for clearing


The plug-in not quite completely working fine, I've still seen some issues when a user tries to register with IPv6 internet addresses (IPv6 seems to be mostly from Russia and China, and are not yet supported in XF). An error is thrown if they are from a black listed country and this plugin tries to log the data... I'm looking at a fix now, and a way to log the attempt.
(its only an error for those that are blacklisted anyway, and I believe will also be fixed by changing the column type of the ip_address)

I am blacklisting, can you attach image of the error? just in case i got the same error i would know its related to IPv6 registration attempt
 
can you attach image of the error? just in case i got the same error i would know its related to IPv6 registration attempt

The error might pop up in the server error log:
Out of range value for column 'ip_address'

It's basically telling me that when some IP addresses are on a black list, and subsequently an attempt to log them occurs, some fail.
I'm testing the fix now (I need to wait until I'm bombard with a few more Russian / Chinese registration attempts)
 
Top Bottom