mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-29 13:00:26 +02:00
99 bugs on the wall ...
#11339 #11283 ... 97 bugs on the wall ... git-svn-id: file:///svn/phpbb/trunk@7658 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -1381,7 +1381,7 @@ function validate_username($username, $allowed_username = false)
|
|||||||
|
|
||||||
foreach ($bad_usernames as $bad_username)
|
foreach ($bad_usernames as $bad_username)
|
||||||
{
|
{
|
||||||
if (preg_match('#^' . $bad_username . '#', $clean_username))
|
if (preg_match('#^' . str_replace('#', '\#', $bad_username) . '#', $clean_username))
|
||||||
{
|
{
|
||||||
return 'USERNAME_DISALLOWED';
|
return 'USERNAME_DISALLOWED';
|
||||||
}
|
}
|
||||||
|
@@ -533,6 +533,14 @@ function phpbb_convert_authentication($mode)
|
|||||||
ORDER BY user_regdate ASC";
|
ORDER BY user_regdate ASC";
|
||||||
$result = $src_db->sql_query($sql);
|
$result = $src_db->sql_query($sql);
|
||||||
|
|
||||||
|
|
||||||
|
$sql = 'SELECT group_id
|
||||||
|
FROM ' . GROUPS_TABLE . "
|
||||||
|
WHERE group_name = '" . $db->sql_escape('BOTS') . "'";
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
$bot_group_id = (int) $db->sql_fetchfield('group_id');
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
while ($row = $src_db->sql_fetchrow($result))
|
while ($row = $src_db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
$user_id = (int) phpbb_user_id($row['user_id']);
|
$user_id = (int) phpbb_user_id($row['user_id']);
|
||||||
@@ -710,7 +718,7 @@ function phpbb_convert_authentication($mode)
|
|||||||
if ($mode == 'start')
|
if ($mode == 'start')
|
||||||
{
|
{
|
||||||
user_group_auth('guests', 'SELECT user_id, {GUESTS} FROM ' . USERS_TABLE . ' WHERE user_id = ' . ANONYMOUS, false);
|
user_group_auth('guests', 'SELECT user_id, {GUESTS} FROM ' . USERS_TABLE . ' WHERE user_id = ' . ANONYMOUS, false);
|
||||||
user_group_auth('registered', 'SELECT user_id, {REGISTERED} FROM ' . USERS_TABLE . ' WHERE user_id <> ' . ANONYMOUS, false);
|
user_group_auth('registered', 'SELECT user_id, {REGISTERED} FROM ' . USERS_TABLE . ' WHERE user_id <> ' . ANONYMOUS . " AND group_id <> $bot_group_id", false);
|
||||||
|
|
||||||
// Selecting from old table
|
// Selecting from old table
|
||||||
if (!empty($config['increment_user_id']))
|
if (!empty($config['increment_user_id']))
|
||||||
|
Reference in New Issue
Block a user