From c7853e2a4e5782309d9da0db3a890233a8684389 Mon Sep 17 00:00:00 2001 From: Henry Sudhof Date: Mon, 21 May 2007 17:50:12 +0000 Subject: [PATCH] Better this way :D git-svn-id: file:///svn/phpbb/trunk@7660 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/cache.php | 2 +- phpBB/includes/functions_user.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/cache.php b/phpBB/includes/cache.php index 1f22d60a7f..d021aac507 100644 --- a/phpBB/includes/cache.php +++ b/phpBB/includes/cache.php @@ -394,7 +394,7 @@ class cache extends acm $usernames = array(); while ($row = $db->sql_fetchrow($result)) { - $usernames[] = utf8_clean_string(str_replace('%', '.*?', preg_quote($row['disallow_username'], '$#'))); + $usernames[] = str_replace('%', '.*?', preg_quote(utf8_clean_string($row['disallow_username']), '#')); } $db->sql_freeresult($result); diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 3c01186528..cab9d8bc25 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -1381,7 +1381,7 @@ function validate_username($username, $allowed_username = false) foreach ($bad_usernames as $bad_username) { - if (preg_match('#^' . str_replace('#', '\#', $bad_username) . '#', $clean_username)) + if (preg_match('#^' . $bad_username . '#', $clean_username)) { return 'USERNAME_DISALLOWED'; }