diff options
author | Andreas Fischer <bantu@phpbb.com> | 2011-11-14 15:46:50 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2011-11-14 15:46:50 +0100 |
commit | f31da015fcad1efb792e78462af7eb56e1abcabc (patch) | |
tree | b1f981fd095f751eec3b7f0c64164de43e6490de /phpBB/install | |
parent | 9d7b144c54f28faf02f93740930dfb633c2e78cb (diff) | |
parent | 3302305cd4a499603784aa87a40f5170d62a4f26 (diff) | |
download | forums-f31da015fcad1efb792e78462af7eb56e1abcabc.tar forums-f31da015fcad1efb792e78462af7eb56e1abcabc.tar.gz forums-f31da015fcad1efb792e78462af7eb56e1abcabc.tar.bz2 forums-f31da015fcad1efb792e78462af7eb56e1abcabc.tar.xz forums-f31da015fcad1efb792e78462af7eb56e1abcabc.zip |
Merge remote-tracking branch 'nickvergessen/ticket/9066' into develop-olympus
* nickvergessen/ticket/9066:
[ticket/9066] Move regex into get_preg_expression function and add tests
[ticket/9066] Disallow some database prefix to prevent same errors and problems
Diffstat (limited to 'phpBB/install')
-rw-r--r-- | phpBB/install/install_install.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 9fe0c8aed5..ccdcf211f1 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -546,6 +546,11 @@ class install_install extends module $error[] = $lang['INST_ERR_NO_DB']; $connect_test = false; } + else if (!preg_match(get_preg_expression('table_prefix'), $data['table_prefix'])) + { + $error[] = $lang['INST_ERR_DB_INVALID_PREFIX']; + $connect_test = false; + } else { $connect_test = connect_check_db(true, $error, $available_dbms[$data['dbms']], $data['table_prefix'], $data['dbhost'], $data['dbuser'], htmlspecialchars_decode($data['dbpasswd']), $data['dbname'], $data['dbport']); @@ -2032,7 +2037,7 @@ class install_install extends module 'dbname' => array('lang' => 'DB_NAME', 'type' => 'text:25:100', 'explain' => false), 'dbuser' => array('lang' => 'DB_USERNAME', 'type' => 'text:25:100', 'explain' => false), 'dbpasswd' => array('lang' => 'DB_PASSWORD', 'type' => 'password:25:100', 'explain' => false), - 'table_prefix' => array('lang' => 'TABLE_PREFIX', 'type' => 'text:25:100', 'explain' => false), + 'table_prefix' => array('lang' => 'TABLE_PREFIX', 'type' => 'text:25:100', 'explain' => true), ); var $admin_config_options = array( 'legend1' => 'ADMIN_CONFIG', |