mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
Prevent sqlite databases within the forum directory
git-svn-id: file:///svn/phpbb/trunk@6136 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -1613,6 +1613,13 @@ class install_install extends module
|
||||
return false;
|
||||
}
|
||||
|
||||
// Make sure we don't have a daft user who thinks having the SQLite database in the forum directory is a good idea
|
||||
if ($dbms == 'sqlite' && stripos(phpbb_realpath($dbhost), phpbb_realpath('../')) === 0)
|
||||
{
|
||||
$error[] = $lang['INST_ERR_DB_FORUM_PATH'];
|
||||
return false;
|
||||
}
|
||||
|
||||
// Try and connect ...
|
||||
if (is_array($db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false)))
|
||||
{
|
||||
|
Reference in New Issue
Block a user