Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The user info part of an URI should be decoded #3716

cedx opened this Issue Feb 26, 2019 · 0 comments


None yet
1 participant
Copy link

cedx commented Feb 26, 2019

Issue type:
Bug report

Database system/driver:

  • mysql / mariadb
  • postgres

TypeORM version:

Steps to reproduce or a small repository showing the problem:
If I use this ormconfig.yaml file, I can connect to my database:

  type: postgres
  host: localhost
  port: 5432
  database: foo_bar
  username: postgres
  password: Foo@Bar@      # Note the "at" signs!

But if I use an url instead, my password is refused:

  type: postgres
  url: 'postgres://postgres:Foo%40Bar%40@localhost:5432/foo_bar'

The password sent to the database is Foo%40Bar%40 instead of Foo@Bar@. So if I want to use an url, I must use a password with only "standard" characters.

That's a wrong behavior : the user info in an URI can contain special characters that are URL-encoded, and so they must be decoded before using them to connect to the database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.