From 0bfd3b59e7c0f565516dc5f626f3aead38a6b886 Mon Sep 17 00:00:00 2001 From: David M Date: Sun, 20 Apr 2008 04:57:29 +0000 Subject: [PATCH] #18775 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8507 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/CHANGELOG.html | 1 + phpBB/includes/functions_install.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 067a2c88e4..c6143196c2 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -89,6 +89,7 @@
  • [Fix] Fixed blank style on setups having no username defined within config.php (Bug #25065)
  • [Fix] Made the compress_tar class tolerate archives that do not properly have their archived contents listed (Bug #14429 / thanks to JRSweets for his patch)
  • [Fix] Moved topics should not count towards the number of topics in a forum (Bug #14648 / thanks to Schumi for his patch)
  • +
  • [Fix] Properly check for invalid characters in MySQL DB prefixes during install (Bug #18775)
  • 1.ii. Changes since 3.0.0

    diff --git a/phpBB/includes/functions_install.php b/phpBB/includes/functions_install.php index f43ef7c5c7..90459813f1 100644 --- a/phpBB/includes/functions_install.php +++ b/phpBB/includes/functions_install.php @@ -286,7 +286,7 @@ function connect_check_db($error_connect, &$error, $dbms_details, $table_prefix, { case 'mysql': case 'mysqli': - if (strpos($table_prefix, '-') !== false || strpos($table_prefix, '.') !== false) + if (strspn($table_prefix, '-./\\') !== 0) { $error[] = $lang['INST_ERR_PREFIX_INVALID']; return false;