Escape postgres password, GH-96

This commit is contained in:
Dan Sosedoff
2015-08-15 21:11:09 -05:00
parent c02d15ec34
commit 3170fb22cb
3 changed files with 5 additions and 4 deletions

View File

@@ -3,6 +3,7 @@ package connection
import (
"errors"
"fmt"
neturl "net/url"
"os"
"os/user"
"strings"
@@ -83,7 +84,7 @@ func BuildString(opts command.Options) (string, error) {
}
if opts.Pass != "" {
url += fmt.Sprintf(":%s", opts.Pass)
url += fmt.Sprintf(":%s", neturl.QueryEscape(opts.Pass))
}
url += fmt.Sprintf("@%s:%d", opts.Host, opts.Port)

File diff suppressed because one or more lines are too long