Encode connection password so it could be passed via get request

This commit is contained in:
Dan Sosedoff 2015-04-29 20:03:39 -05:00
parent ec6bb5590d
commit 7a75447364
2 changed files with 3 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -410,7 +410,7 @@ function getConnectionString() {
port = "5432";
}
url = "postgres://" + user + ":" + pass + "@" + host + ":" + port + "/" + db + "?sslmode=" + ssl;
url = "postgres://" + user + ":" + encodeURIComponent(pass) + "@" + host + ":" + port + "/" + db + "?sslmode=" + ssl;
}
else {
var local = url.indexOf("localhost") != -1 || url.indexOf("127.0.0.1") != -1;