[2.0.7] Ban Email Wildcard Upgrade

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
5
83%
Very Good
0
No votes
Good
1
17%
Fair
0
No votes
Poor
0
No votes
 
Total votes: 6

Extensions Robot
Extensions Robot
Extensions Robot
Posts: 28600
Joined: Sat Aug 16, 2003 7:36 am

[2.0.7] Ban Email Wildcard Upgrade

Post by Extensions Robot »

MOD Name: Ban Email Wildcard Upgrade
Author: jsmotta
MOD Description: Upgrades the ability to use wilcards in banning email adresses by allowing the banning of entire groups of domains. For isnstance, just adding *@yahoo.* to the ban list, will ban email addresses at all of yahoo's many international email domains, such as yahoo.com, yahoo.co.uk, yahoo.de, etc.

MOD Version: 1.0.0

Download File: ban_email_wildcard_upgrade.mod
mods overview page: View
File Size: 2162 Bytes

Security Score:
Last edited by Extensions Robot on Mon Apr 30, 2007 12:30 am, edited 1 time in total.
(this is a non-active account manager for the phpBB Extension Customisations Team)
wGEric
Former Team Member
Posts: 8805
Joined: Sun Oct 13, 2002 3:01 am
Location: Friday
Name: Eric Faerber
Contact:

Post by wGEric »

MOD Validated/Released

Notes:
Great MOD so you don't have to enter in every different domain for a certain email provider.
tkomc
Registered User
Posts: 33
Joined: Wed Aug 21, 2002 9:20 am

Post by tkomc »

It works great. Just wonder if it can be enhanced so that it can phpBB can handle subdomain.

E.g. *@*.abc.com will ban all email account including *@us.abc.com, *@uk.abc.com, etc.
jsmotta
Registered User
Posts: 38
Joined: Thu Dec 25, 2003 12:05 am

Post by jsmotta »

tkomc wrote: It works great. Just wonder if it can be enhanced so that it can phpBB can handle subdomain.

E.g. *@*.abc.com will ban all email account including *@us.abc.com, *@uk.abc.com, etc.


Good idea. Didn't even think of that. My initial tests show this works...

Code: Select all

if (preg_match('#^(([a-z0-9&.-_+])|(\*))+@((\.([a-z0-9\-]+\.)*?[a-z]+)|(\*))?[a-z0-9\-\.]+((\.([a-z0-9\-]+\.)*?[a-z]+)|(\*))$#is', trim($email_list_temp[$i])))
My only concern, is that this effectively allows you to ban *@*.* , which is, well, the entire universe. But, I suppose there's no reason to prevent someone from banning the entire universe, as long as they understood what they were doing. Might be a good way to temporarily prevent any new subscriptions, if you had a need to.

Anyhow, let me know if that works for you, and I'll post an updated .mod file with the enhancement.
mattr0x
Registered User
Posts: 155
Joined: Wed May 21, 2003 1:31 am
Contact:

Post by mattr0x »

if you need to disable subscriptions/registrations, theres an option already for that in the ACP.
User avatar
Techie-Micheal
Security Consultant
Posts: 19511
Joined: Sun Oct 14, 2001 12:11 am
Location: In your servers

Post by Techie-Micheal »

The only problem I have is that I can't seem to get adding *@*.blah.com to work. I have to add it manually, and from there it works wonderfully. 2.0.8a. subSilver.
Proven Offensive Security Expertise. OSCP - GXPN
richey
Registered User
Posts: 617
Joined: Mon Feb 18, 2002 4:26 pm
Location: now@Cyberspace
Contact:

Post by richey »

Hi,

if I would add *@yahoo.* to the ban list, would this ban all currently registered users having a Yahoo mail address from the forum or will it just affect NEW user registrations (which would be what I want!).

thanks
Richey
.
mattmoore
Registered User
Posts: 1
Joined: Mon Sep 27, 2004 3:47 am
Contact:

how about

Post by mattmoore »

What about being able to use the wildcard to block top-level domains.. such as all .coms (*@*.com) ??
David Palmer
Registered User
Posts: 319
Joined: Tue Nov 23, 2004 5:25 pm

Post by David Palmer »

Nice mod -- it's *almost* exactly what I was looking for! I was wanting to ban some stubborn .biz top-level-domains from registering their advertisements (visual confirmation had no effect on these guys). I suspect there are a number of people out there running forums who might sometime need to ban *@*.biz, *@*.ru, or other email top-level domains.

The mod as written above won't allow you to block *@*.whatever, so I modified the code as follows:

Code: Select all

if (preg_match('#^(([a-z0-9&.\-_+])|(\*))+@+(([a-z0-9\-\.])|(\*))+((\.([a-z0-9\-]+\.)*?[a-z]+)|(\*))$#is', trim($email_list_temp[$i]))) 
This will allow you to ban (for example):
*@anything.com
*@*.com
*@anything.*

Of course, be careful with what you're trying to ban, so you don't ban legitimate users.

I also added a "\" before hyphen in the first part of the expression -- as originally written, it wouldn't allow banning of usernames with hypens, but escaping the hypen fixes that problem.

Hope this is of use to someone,

Dave
User avatar
64bitguy
Registered User
Posts: 44
Joined: Mon Apr 05, 2004 5:56 am
Location: New Hampshire, USA
Name: Steph
Contact:

Post by 64bitguy »

Are you saying that using the code below actually doing *@*.*.* as in banning *@subdomain.domain.extension? or is this merely handling non-subdomains?

For example, If I want to ban all yahoo subdomain, I would want to enter this: *@*.yahoo.*, given this scenario, does the below code do that?

Thanks!
jsmotta wrote:
tkomc wrote:It works great. Just wonder if it can be enhanced so that it can phpBB can handle subdomain.

E.g. *@*.abc.com will ban all email account including *@us.abc.com, *@uk.abc.com, etc.


Good idea. Didn't even think of that. My initial tests show this works...

Code: Select all

if (preg_match('#^(([a-z0-9&.-_+])|(\*))+@((\.([a-z0-9\-]+\.)*?[a-z]+)|(\*))?[a-z0-9\-\.]+((\.([a-z0-9\-]+\.)*?[a-z]+)|(\*))$#is', trim($email_list_temp[$i])))
My only concern, is that this effectively allows you to ban *@*.* , which is, well, the entire universe. But, I suppose there's no reason to prevent someone from banning the entire universe, as long as they understood what they were doing. Might be a good way to temporarily prevent any new subscriptions, if you had a need to.

Anyhow, let me know if that works for you, and I'll post an updated .mod file with the enhancement.
coderedstar
Registered User
Posts: 7
Joined: Thu Apr 28, 2005 7:39 pm

Post by coderedstar »

The link is dead or incorrect. Could someone please update the link or post a new URL to it? Thanks.
twister17e
Registered User
Posts: 187
Joined: Tue Aug 17, 2004 9:31 pm
Contact:

Post by twister17e »

The link works fine for me. Make sure you don't have another program set to try to open .mod format files.
coderedstar
Registered User
Posts: 7
Joined: Thu Apr 28, 2005 7:39 pm

Post by coderedstar »

Hmm... almost every mod I wanted to use works. All except for this one and one other I tried to obtain a while ago. As well, I should have Dreamweaver set to open all .mod files into a writable format, so it should work, correct?
EelcoH
Registered User
Posts: 17
Joined: Thu Mar 24, 2005 2:53 pm
Location: The Netherlands
Contact:

Post by EelcoH »

How about if I want to block certain words in an email address, like:

*phentermine*@*.*

How would I do that?

To Richey:
Banning users prevents them from logging in, so that would also affect exisiting users...
User avatar
freddie
Registered User
Posts: 404
Joined: Sun Mar 31, 2002 1:40 pm
Location: Estes Park, USA
Contact:

Post by freddie »

great !!

finaly a way to block all *.ru accounts :)
Post Reply

Return to “[2.0.x] MOD Database Cleanup”

cron