summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2013-01-24 22:35:56 -0500
committerBharat Mediratta <bharat@menalto.com>2013-01-25 14:17:52 -0500
commit7548266edf6d277527ba69153e7eadcf811bbb14 (patch)
treed235d50770ea1b2631c70ebefef879e94bd70831
parent0397497ba0a019548eaf909e7ef61a53008d9403 (diff)
Properly escape backslashes. Fixes #1962.
-rw-r--r--installer/web.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/installer/web.php b/installer/web.php
index a7060bd8..5fa8541e 100644
--- a/installer/web.php
+++ b/installer/web.php
@@ -41,9 +41,9 @@ if (installer::already_installed()) {
list ($config["host"], $config["port"]) = explode(":", $config["host"] . ":");
foreach ($config as $k => $v) {
if ($k == "password") {
- $config[$k] = str_replace("'", "\\'", $v);
+ $config[$k] = str_replace(array("'", "\\"), array("\\'", "\\\\"), $v);
} else {
- $config[$k] = strtr($v, "'`", "__");
+ $config[$k] = strtr($v, "'`\\", "___");
}
}