Url Escape the password provided to postgres

This commit is contained in:
Juan Calderon
2022-12-10 22:14:35 -08:00
parent f681dcebfb
commit 4d9108e34d
2 changed files with 3 additions and 3 deletions

View File

@@ -55,7 +55,7 @@ func New(config ...Config) *Storage {
dsn += url.QueryEscape(cfg.Username)
}
if cfg.Password != "" {
dsn += ":" + cfg.Password
dsn += ":" + url.QueryEscape(cfg.Password)
}
if cfg.Username != "" || cfg.Password != "" {
dsn += "@"