riverqueue / river

Fast and reliable background jobs in Go
https://riverqueue.com
Mozilla Public License 2.0
3.59k stars 94 forks source link

Password in database URL should url encode special characters #676

Open flamendless opened 2 weeks ago

flamendless commented 2 weeks ago

Hi, if DATABASE_URL is used with password that is randomly generated with special characters such as { and } (like from AWS) an error occurs failed: error parsing database URL: cannot parse 'postgres://root:xxxxxx@localhost:5432/dbname': failed to parse as URL (net/url: invalid userinfo)

Errors: river migrate-up --database-url "postgres://root:a{a}@localhost:5432/dbname" Works: river migrate-up --database-url "postgres://root:a%7Ba%7D@localhost:5432/dbname"