Escape postgres password, GH-96
This commit is contained in:
@@ -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
Reference in New Issue
Block a user