Skip to content

Commit 3e01779

Browse files
urlencode password, update region call
1 parent b66b204 commit 3e01779

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func (s DatabaseConfiguration) PostgreSQLConnectionString() string {
3838

3939
dbinput := strings.TrimSuffix(cname, ".") + ":5432"
4040
slog.Info("requesting auth token")
41-
authenticationToken, err := auth.BuildAuthToken(context.TODO(), dbinput, "us-east-1", s.Username, cfg.Credentials)
41+
authenticationToken, err := auth.BuildAuthToken(context.TODO(), dbinput, cfg.Region, s.Username, cfg.Credentials)
4242
if err != nil {
4343
panic("failed to create authentication token: " + err.Error())
4444
}
@@ -49,7 +49,7 @@ func (s DatabaseConfiguration) PostgreSQLConnectionString() string {
4949
} else if s.Connection != "" {
5050
return s.Connection
5151
} else {
52-
return fmt.Sprintf("postgresql://%s:%s@%s/%s", s.Username, s.Secret, s.Address, s.Database)
52+
return fmt.Sprintf("postgresql://%s:%s@%s/%s", s.Username, url.QueryEscape(s.Secret), s.Address, s.Database)
5353
}
5454
}
5555

0 commit comments

Comments
 (0)