From a6de878b1367f98da59078b744a7302d7cc04d69 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Fri, 19 Jul 2002 15:22:36 +0000 Subject: [PATCH] Quote # in rex for username validations git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@2720 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_validate.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/functions_validate.php b/phpBB/includes/functions_validate.php index 22b4c1c185..2ae915090c 100644 --- a/phpBB/includes/functions_validate.php +++ b/phpBB/includes/functions_validate.php @@ -63,7 +63,7 @@ function validate_username($username) { 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']); } @@ -76,7 +76,7 @@ function validate_username($username) { 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']); }