From 7548266edf6d277527ba69153e7eadcf811bbb14 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 24 Jan 2013 22:35:56 -0500 Subject: [PATCH] Properly escape backslashes. Fixes #1962. --- installer/web.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/web.php b/installer/web.php index a7060bd891..5fa8541eb4 100644 --- a/installer/web.php +++ b/installer/web.php @@ -41,9 +41,9 @@ 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, "'`\\", "___"); } }