mirror of
https://github.com/silverstripe/silverstripe-installer
synced 2024-06-18 10:41:47 +02:00
#2058 - Installer does not escape passwords in _config files
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/trunk@47903 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
a4cadc80f6
commit
1fe1614bce
|
@ -593,8 +593,9 @@ PHP;
|
|||
echo "<li>Creating '$template/_config.php'...</li>";
|
||||
flush();
|
||||
|
||||
$devServers = $this->var_export_array_nokeys(explode("\n", $_POST['devsites']));
|
||||
|
||||
$devServers = $this->var_export_array_nokeys(explode("\n", $_POST['devsites']));
|
||||
|
||||
$escapedPassword = addslashes($config['mysql']['password']);
|
||||
$this->createFile("$template/_config.php", <<<PHP
|
||||
<?php
|
||||
|
||||
|
@ -608,7 +609,7 @@ global \$databaseConfig;
|
|||
"type" => "$config[database]",
|
||||
"server" => "{$config['mysql']['server']}",
|
||||
"username" => "{$config['mysql']['username']}",
|
||||
"password" => "{$config['mysql']['password']}",
|
||||
"password" => "{$escapedPassword}",
|
||||
"database" => "{$config['mysql']['database']}",
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user