Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Automatically deny registration for users with multi-dotted email address Details »»
Automatically deny registration for users with multi-dotted email address
Mod Version: 1.00, by cloferba (Contributor) cloferba is online now
Developer Last Online: May 2013 I like it Show Printable Version Email this Page

vB Version: 4.2.0 Rating: (2 votes - 4.00 average) Installs: 12
Released: 27 May 2012 Last Update: Never Downloads: 0
Not Supported Uses Plugins Re-usable Code Translations  

On my forum many bots have multi-dotted email address so I wanted to avoid them to create a new account on my forum.

The way to do this is create a new plugin to recognize these multi-dotted email address provided at time of registration and delete them automatically.

Steps:
  • Create a new plugin using hook userdata_start
  • Use this code:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

It only checks the part before the '@', so set $max_dots to the number of dots you will allow (I think one dot in an email name probably isn't unusual, but that's up to you). Also, this uses the default 'bademail' phrase, but if you'd rather have a special error messages for "too many dots" you can create a phrase and use the varname in place of 'bademail'.

Special thanks to kh99 who provided this solution.

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #16  
Old 28 May 2012, 07:08
John Lester John Lester is offline
 
Join Date: Nov 2004
Shouldn't this be titled something like "Automatically deny registration for users with multi-dotted email address" since it doesn't actually delete anything?
Reply With Quote
  #17  
Old 28 May 2012, 11:51
cloferba cloferba is online now
 
Join Date: Apr 2009
Originally Posted by John Lester View Post
Shouldn't this be titled something like "Automatically deny registration for users with multi-dotted email address" since it doesn't actually delete anything?
you are right
Reply With Quote
  #18  
Old 28 May 2012, 14:13
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Or "Prevent users from registering with SPAM-like email addresses".
Reply With Quote
  #19  
Old 28 May 2012, 18:34
victorvu victorvu is offline
 
Join Date: Mar 2011
Thumbs up IP does not show up

Hi:

This is totally unrelated, but I ask anyway. Hope that I will get the suggestion.

I want to deny guests who IPs do not show up in the list. How can I do this?

Thanks.

Victor
Reply With Quote
  #20  
Old 29 May 2012, 16:05
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Originally Posted by kh99 View Post
That's a good thought, but unfortunately it won't work the way this is written. It replaces the code that verifies an email address, so if you have multiple plugins doing the same thing, only the last one to run would have any effect.

You might be able to do something like this:
Perfect.

Slight modification to prevent commas, semicolons, and colons, since I got another Chinese bot this morning trying to register with the email "liantianha,ofangjiancong@gmail.com":



Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #21  
Old 29 May 2012, 16:34
kh99's Avatar
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Originally Posted by djbaxter View Post
Slight modification to prevent commas, semicolons, and colons, since I got another Chinese bot this morning trying to register with the email "liantianha,ofangjiancong@gmail.com"...

Hmm, that's interesting because that code should still be calling the existing is_valid_email() function, which does a preg_match using some complicated pattern which looks like it doesn't allow commas in the name (or semicolons, for that matter). Maybe it's not calling that function like I think it is.

ETA: no, I'm wrong somewhere, because commas are allowed even if I disable this plugin. So, good addition.

ETA: actually it looks like it's a vb bug, a problem in that pattern. It contains "+-/" which allows characters from + through /, which are "+ , - . /". The effect is only to allow commas when they shouldn't be allowed (the - should be escaped, or listed first or last).


(I missed your post, nhawk - did you beat me to it?)
__________________
Please don't PM me - post your questions in the appropriate forum.
Please don't PM me to ask me to read your thread.

Last edited by kh99 : 29 May 2012 at 17:10.
Reply With Quote
  #22  
Old 29 May 2012, 17:01
dilbert dilbert is offline
 
Join Date: Nov 2004
I'm not knocking the mod, but what about people with legitimate periods in their email?
An interesting note for Gmail users, the number of periods is irrelevant.
myusername@gmail.com it the same as
my.user.name@gmail.com or
m.y.u.s.e.r.n.a.m.e@gmail.com.
Reply With Quote
  #23  
Old 29 May 2012, 17:11
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Most likely, if you're using:

m.y.u.s.e.r.n.a.m.e@gmail.com
then you are spamming.
Reply With Quote
  #24  
Old 29 May 2012, 17:50
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Originally Posted by dilbert View Post
I'm not knocking the mod, but what about people with legitimate periods in their email?
An interesting note for Gmail users, the number of periods is irrelevant.
myusername@gmail.com it the same as
my.user.name@gmail.com or
m.y.u.s.e.r.n.a.m.e@gmail.com.
It's your choice but you can set the number of allowed periods here:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Change that =>1 to =>2 or =>3 or whatever. Actually, on reflection, I went back and changed it to 2 on my forums.

But Boofo is correct: if you have more than 1 or 2 you're probably up to no good anyway.

Added: This works fine on a vBulletin 3.87 forum as well as 4.x.
Reply With Quote
  #25  
Old 29 May 2012, 18:16
dilbert dilbert is offline
 
Join Date: Nov 2004
OK, just pointing out that at least Gmail ignores any periods before the @.
Reply With Quote
  #26  
Old 29 May 2012, 18:30
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
And that is exactly why you see a lot of gmail spammer addresses.
Reply With Quote
  #27  
Old 29 May 2012, 18:54
dilbert dilbert is offline
 
Join Date: Nov 2004
Yeah but...
They are the same address. Try it if you have Gmail. Send yourself something with a few extra periods before the @, it will still be delivered.
I don't want to keep taking this off-topic though.
Reply With Quote
  #28  
Old 29 May 2012, 19:03
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Originally Posted by dilbert View Post
Yeah but...
They are the same address. Try it if you have Gmail. Send yourself something with a few extra periods before the @, it will still be delivered.
I don't want to keep taking this off-topic though.
No. Gmail may ignore them but most email clients and servers do not. And either way, it's a signal for spam that personally I want to eliminate/prevent.
Reply With Quote
  #29  
Old 30 May 2012, 07:51
The Rocketeer's Avatar
The Rocketeer The Rocketeer is offline
 
Join Date: Jun 2010
Originally Posted by Boofo View Post
If you use email verification, that should catch the phony email addresses so they wouldn't be able to register, anyway.
Are you sure Boofo? I use email verification (require clicking the activation link in the email sent after registration). However we get quite some bogus email members who are able to register. So you could use a bogus email to register.

wish there was better ways to prevent spammers..

was sent here from here http://www.vbulletin.org/forum/showthread.php?t=283667

Last edited by The Rocketeer : 30 May 2012 at 08:02.
Reply With Quote
  #30  
Old 30 May 2012, 12:20
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Originally Posted by The Rocketeer View Post
Are you sure Boofo? I use email verification (require clicking the activation link in the email sent after registration). However we get quite some bogus email members who are able to register. So you could use a bogus email to register.

wish there was better ways to prevent spammers..

was sent here from here http://www.vbulletin.org/forum/showthread.php?t=283667
Answered in that thread at http://www.vbulletin.org/forum/showp...22&postcount=3
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 03:58.

Layout Options | Width: Wide Color: