Welcome, Guest
Username Password: Remember me

Prevent registration from same IP Address
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Prevent registration from same IP Address

Prevent registration from same IP Address 5 years, 5 months ago #11814

  • neo4evr
  • Fresh Boarder
  • Posts: 12
  • Points: 129
  • Karma: 1

Is there any way i can prevent users from making more than one sign-ups from the same IP Address?

Thanks and best wishes
Last Edit: 5 years, 5 months ago by neo4evr.

Re: Prevent registration from same IP Address 5 years, 5 months ago #11817

  • Bernard
  • Administrator
  • Posts: 3682
  • Karma: 119
Difficult to release.
More components on this site are free but...
Ever thought about giving something back?
Please make a donation if you want to support its continued development. Your donations help by hardware, hosting services and other expenses.

Re: Prevent registration from same IP Address 5 years, 5 months ago #11831

  • pjbauer
  • Fresh Boarder
  • Posts: 2
  • Points: 14
  • Karma: 0
Bernard wrote:
Difficult to release.

Difficult? I'm ready to write the code myself.

I LOVE this component, but it does have a few irritations. It took me forever to find out why Botscout was rejecting my test registrations. I finally figure out that it was because both my email and IP are in their blackmail database! I took 4 hours to run a complete scan of my computer and found 5 instances of mallware - all in backup zip files. So I forced my ISP to re-issue a new IP and used a different email - and now I'm ok. I'm not sure how long Scoutbot holds on to blacklisted emails or IPs - but it looks like it's not easy to have yourself removed from the blacklist.

I'm plenty familiar with php and mySQL, though I'm not real familiar with the Joomla API, or I'd write and share the solution with everyone.

You should be able to write and debug this (and my other suggestions below) all in one day. All you need to do is include a Joomla table with Alpha Registration, insert a new record with each registration data, check against it for any of the "rules", and provide a backend interface to show it and allow admin to view or delete registration entries.

Here's what else I'd suggest. Add a 5 more checkboxes in the "Security" tab with the following options...

The first takes care of Niladri's request...

- Allow multiple users from the same IP

Then 3 just for Botscout...

- Ignore Botscout IP warnings
- Ignore Botscout Email warnings
- Ignore Botscout Name warnings

And one for a general user report screen (so the user knows exactly what is "wrong")...

- Show user Security/Botscout results

An auto-delete feature for the new table with 2 options added to params would be nice also (select boxes for # of days?: 1, 7, 10, 30, never)...

One setting for "Delete Offenders after xx days"
One setting "Delete ALL after xx days".

Then, based on these new parameter settings, ignore or write a new Joomla user record AND always insert a new record in the jos_alpha_resistration table and display the results to the user if that option is set. This table would also help identify the IPs of spammers and allow the admin to add that IP to a list of banned IPs - or if you really want to get slick, inteface AlphaRegistration to automatically, after x number of attempts by the same IP, to add to a list of banned IPs of another 3rd party plugin that keeps troublemaker IPs from having public access at all.

Here's the list of fields for the jos_alpha_registration table...

id, regdate, ip, name, username, email, usernamelist, dnlist, scoutip, scoutmail, scoutname

id [int(11)] = standard auto-increment id
regdate [datetime] = datetime stamp
ip [varchar(11)]= user IP
name [varchar(255)]= user name
username varchar(150)= user username
email varchar(100) = user email
usernamelist [tinyint(1)] = flag for if on banned username list
dnlist [tinyint(1)] = flag for if on banned email domain name list
scoutip [tinyint(4)] = IP count reported by Scoutbot
scoutmail [tinyint(4)] = MAIL count reported by Scoutbot
scoutname [tinyint(4)] = NAME count reported by Scoutbot

Now that I've done the brainstorming for you - you tell me why it can't be easily done?

I'll even write and test the code changes for you and send it to you - you just figure how to create the new mySQL table as part of the install and include the new table editing stuff in the admin backend.

Oh, and here's my fix for the problem users have with the 'file_get_contents' error from line 759 of controller.php.

The reason for the error is that the "file_get_contents" function that you are checking for ALWAYS exists in PHP - that isn't what you should be checking for - and it's why the curl function that you have included as the alternative "else" never gets run.

In the Joomla admin backend Global Configuration there is the checkbox for "Enable Web Services" under "System Settings" of the System tab. THAT setting just tells Joomla that it's ok to try to use the functions. Though even if the user has that checked, A URL can be used as a filename with this function ONLY if the fopen wrappers have been enabled in php.ini. Sometimes you might get an error opening an http URL even though you have set "allow_url_fopen = On" in php.ini. And many users, on a shared server for example, aren't able to change the php.ini file.

To get by the error, you should change line 758 from " if(function_exists('file_get_contents')) { " to:

if(!($data = @file_get_contents($querystr))) {

That will run the file_get_contents($querystr) without displaying the error and return empty (false) if it fails and run the Curl that follows instead. That's all I did to solve the problem on my 1&1 site.

You should let users know that if the server has disabled "allow_url_fopen" and does not have Curl installed - they cannot use Botscout.

Re: Prevent registration from same IP Address 3 years ago #20342

  • blogo
  • Fresh Boarder
  • Posts: 1
  • Points: 30
  • Karma: 0
i found the way to prevent this, you need to modify the code.

reply if you still want to know the answer
  • Page:
  • 1
Time to create page: 0.49 seconds
Goto Top