mirror of
https://github.com/silverstripe/silverstripe-installer
synced 2024-10-22 15:05:33 +00: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
@ -595,6 +595,7 @@ PHP;
|
|||||||
|
|
||||||
$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
|
$this->createFile("$template/_config.php", <<<PHP
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
@ -608,7 +609,7 @@ global \$databaseConfig;
|
|||||||
"type" => "$config[database]",
|
"type" => "$config[database]",
|
||||||
"server" => "{$config['mysql']['server']}",
|
"server" => "{$config['mysql']['server']}",
|
||||||
"username" => "{$config['mysql']['username']}",
|
"username" => "{$config['mysql']['username']}",
|
||||||
"password" => "{$config['mysql']['password']}",
|
"password" => "{$escapedPassword}",
|
||||||
"database" => "{$config['mysql']['database']}",
|
"database" => "{$config['mysql']['database']}",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user