mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-17 07:01:22 +02:00
Quote # in rex for username validations
git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@2720 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -63,7 +63,7 @@ function validate_username($username)
|
|||||||
{
|
{
|
||||||
while( $row = $db->sql_fetchrow($result) )
|
while( $row = $db->sql_fetchrow($result) )
|
||||||
{
|
{
|
||||||
if ( preg_match("#\b(" . str_replace("\*", ".*?", preg_quote($row['disallow_username'])) . ")\b#i", $username) )
|
if ( preg_match("#\b(" . str_replace("\*", ".*?", phpbb_preg_quote($row['disallow_username'], '#')) . ")\b#i", $username) )
|
||||||
{
|
{
|
||||||
return array('error' => true, 'error_msg' => $lang['Username_disallowed']);
|
return array('error' => true, 'error_msg' => $lang['Username_disallowed']);
|
||||||
}
|
}
|
||||||
@@ -76,7 +76,7 @@ function validate_username($username)
|
|||||||
{
|
{
|
||||||
while( $row = $db->sql_fetchrow($result) )
|
while( $row = $db->sql_fetchrow($result) )
|
||||||
{
|
{
|
||||||
if ( preg_match("#\b(" . str_replace("\*", ".*?", preg_quote($row['word'])) . ")\b#i", $username) )
|
if ( preg_match("#\b(" . str_replace("\*", ".*?", phpbb_preg_quote($row['word'], '#')) . ")\b#i", $username) )
|
||||||
{
|
{
|
||||||
return array('error' => true, 'error_msg' => $lang['Username_disallowed']);
|
return array('error' => true, 'error_msg' => $lang['Username_disallowed']);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user