Skip to content

Commit

Permalink
URL encode password
Browse files Browse the repository at this point in the history
  • Loading branch information
pconstantinou authored and acaloiaro committed Jan 28, 2024
1 parent 8e9836e commit b2aa389
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backends/postgres/postgres_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"embed"
"errors"
"fmt"
"net/url"
"os"
"sync"
"time"
Expand Down Expand Up @@ -344,7 +345,7 @@ func (p *PgBackend) initializeDB() (err error) {

pqConnectionString := fmt.Sprintf("postgres://%s:%s@%s/%s?sslmode=%s&x-migrations-table=neoq_schema_migrations",
pgxCfg.User,
pgxCfg.Password,
url.QueryEscape(pgxCfg.Password),
pgxCfg.Host,
pgxCfg.Database,
sslMode)
Expand Down

0 comments on commit b2aa389

Please sign in to comment.