#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:
aoneil 2008-01-11 03:10:50 +00:00
parent a4cadc80f6
commit 1fe1614bce

View File

@ -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']}",
);