Skip to content

Commit

Permalink
Properly escape backslashes. Fixes #1962.
Browse files Browse the repository at this point in the history
  • Loading branch information
bharat committed Jan 25, 2013
1 parent 0397497 commit 7548266
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions installer/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -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, "'`\\", "___");
}
}

Expand Down

0 comments on commit 7548266

Please sign in to comment.