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

Passwords containing a '@' make applications to fail #98

Open
chanmix51 opened this issue Jul 11, 2017 · 5 comments
Open

Passwords containing a '@' make applications to fail #98

chanmix51 opened this issue Jul 11, 2017 · 5 comments
Labels
Milestone

Comments

@chanmix51
Copy link
Member

When the password contains the @ character, the application fails with the message

Could not parse DSN « pgsql://user:p@ss@host:port/db_name »

It is annoying since passwords can be chosen by admin team.

@chanmix51 chanmix51 added the bug label Jul 11, 2017
@stof
Copy link

stof commented Nov 6, 2017

well, that's because the URL is invalid here. You need to url-encode the @ for it to be valid.

@chanmix51
Copy link
Member Author

This means the DSN has to be URL decoded prior to be parsed.

@stof
Copy link

stof commented Nov 8, 2017

not if you parse it with parse_url. It is the one handling things

@stof
Copy link

stof commented Nov 8, 2017

And URL-decoding the whole DSN would not work either, as you would end up decoding pgsql://user:p@ss@host:port/db_name again, which has the same issue. You should decode only each component after identifying them in case you parse the URI yourselves

@chanmix51 chanmix51 added this to the 3.0 milestone Aug 20, 2019
@chanmix51
Copy link
Member Author

Related to #77

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants