diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-08-02 01:02:10 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-08-02 01:02:10 +0000 |
commit | 1d2382ccc08d663a6866183034ccf98cdb5ea4da (patch) | |
tree | be026c832b89b161dd2514b61cf8884b2ec4f1a1 | |
parent | 1001c866518dec693c1e08296febc318e982ae80 (diff) | |
download | forums-1d2382ccc08d663a6866183034ccf98cdb5ea4da.tar forums-1d2382ccc08d663a6866183034ccf98cdb5ea4da.tar.gz forums-1d2382ccc08d663a6866183034ccf98cdb5ea4da.tar.bz2 forums-1d2382ccc08d663a6866183034ccf98cdb5ea4da.tar.xz forums-1d2382ccc08d663a6866183034ccf98cdb5ea4da.zip |
Wildcard username ban in email banning
git-svn-id: file:///svn/phpbb/trunk@791 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r-- | phpBB/admin/admin_user_ban.php | 2 | ||||
-rwxr-xr-x | phpBB/language/lang_english.php | 4 | ||||
-rw-r--r-- | phpBB/profile.php | 3 |
3 files changed, 5 insertions, 4 deletions
diff --git a/phpBB/admin/admin_user_ban.php b/phpBB/admin/admin_user_ban.php index e4b842321e..706565df6d 100644 --- a/phpBB/admin/admin_user_ban.php +++ b/phpBB/admin/admin_user_ban.php @@ -173,7 +173,7 @@ if( isset($HTTP_POST_VARS['submit']) && isset($HTTP_POST_VARS['bancontrol']) ) // contained in the annotated php manual at php.com (ereg // section) // - if( eregi("^[[:alnum:]]([-_.]?[[:alnum:]]\.?)*@[[:alnum:]]([-_.]?[[:alnum:]]\.?)*\.[[:alnum:]]{0,4}$", trim( $email_list_temp[$i])) ) + if( eregi("^(([[:alnum:]]+([-_.][[:alnum:]]+)*\.?)|(\*))@([[:alnum:]]+([-_]?[[:alnum:]]+)*\.){1,3}([[:alnum:]]{2,6})$", trim($email_list_temp[$i])) ) { $email_list[] = trim($email_list_temp[$i]); } diff --git a/phpBB/language/lang_english.php b/phpBB/language/lang_english.php index e1c8d5cf16..5688c3e3fa 100755 --- a/phpBB/language/lang_english.php +++ b/phpBB/language/lang_english.php @@ -740,9 +740,9 @@ $lang['Ban_username'] = "Ban one or more specific users"; $lang['Ban_username_explain'] = "You can ban multiple users in one go using the appropriate combination of mouse and keyboard for your computer and browser"; $lang['Ban_IP'] = "Ban one or more IP addresses or hostnames"; $lang['IP_hostname'] = "IP addresses or hostnames"; -$lang['Ban_IP_explain'] = "To specify several different IP's or hostnames separate them with commas, to specify a range of IP's (not hostnames) separate the start and end with a hyphen (-), to specify a wildcard use *"; +$lang['Ban_IP_explain'] = "To specify several different IP's or hostnames separate them with commas. To specify a range of IP addresses separate the start and end with a hyphen (-), to specify a wildcard use *"; $lang['Ban_email'] = "Ban one or more email addresses"; -$lang['Ban_email_explain'] = "To specify more than one email address separate them with commas"; +$lang['Ban_email_explain'] = "To specify more than one email address separate them with commas. To specify a wildcard username use *, for example *@hotmail.com"; $lang['Unban_username'] = "Un-ban one more specific users"; $lang['Unban_username_explain'] = "You can unban multiple users in one go using the appropriate combination of mouse and keyboard for your computer and browser"; diff --git a/phpBB/profile.php b/phpBB/profile.php index eeba6a7221..882848ae50 100644 --- a/phpBB/profile.php +++ b/phpBB/profile.php @@ -330,7 +330,8 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) $ban_email_list = $db->sql_fetchrowset($result); for($i = 0; $i < count($ban_email_list); $i++) { - if( eregi("^" . $ban_email_list[$i]['ban_email'] . "$", $email) ) + $match_email = str_replace("*@", ".*@", $ban_email_list[$i]['ban_email']); + if( eregi("^" . $match_email . "$", $email) ) { $error = TRUE; if(isset($error_msg)) |