1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 20:13:22 +01:00

Catch invalid username wildcard ban (we do not support these) (Bug #29305)

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8668 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2008-06-21 17:08:41 +00:00
parent 11f27bee84
commit 56aba11fd1
2 changed files with 58 additions and 62 deletions

View File

@ -114,6 +114,7 @@
<li>[Fix] Do not display ban message if direct call to cron. (thanks Dog Cow for reporting)</li>
<li>[Fix] Correctly display double-colon on special conditions within highlighted php source (Bug #26795)</li>
<li>[Fix] Increase storage capacity of titles/subjects due to specialchared content (Bug #25235)</li>
<li>[Fix] Catch invalid username wildcard ban (we do not support these) (Bug #29305)</li>
<li>[Change] Adjust truncate_string() to be able to adjust the maximum storage length.</li>
<li>[Change] Generalize load check (Bug #21255 / thanks to Xipher)</li>
<li>[Change] Make utf8_htmlspecialchars not pass its argument by reference (Bug #21885)</li>

View File

@ -734,13 +734,8 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
case 'user':
$type = 'ban_userid';
if (in_array('*', $ban_list))
{
// Ban all users (it's a good thing that you can exclude people)
$banlist_ary[] = '*';
}
else
{
// At the moment we do not support wildcard username banning
// Select the relevant user_ids.
$sql_usernames = array();
@ -794,10 +789,10 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
}
else
{
$db->sql_freeresult($result);
trigger_error('NO_USERS');
}
$db->sql_freeresult($result);
}
break;
case 'ip':
@ -997,7 +992,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
switch ($mode)
{
case 'user':
$sql_where = (in_array('*', $banlist_ary)) ? '' : 'WHERE ' . $db->sql_in_set('session_user_id', $banlist_ary);
$sql_where = 'WHERE ' . $db->sql_in_set('session_user_id', $banlist_ary);
break;
case 'ip':