aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/cache.php2
-rw-r--r--phpBB/includes/functions_user.php2
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';
}