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

Connection to Postgres fails for passwords containing hashtags # #170

Open
jackrsteiner opened this issue Sep 3, 2021 · 0 comments
Open

Comments

@jackrsteiner
Copy link

When attempting to connect to a PostgreSQL 13.4 instance, I found passwords containing the # character would result in failure:

getaddrinfo EAI_AGAIN postgres postgres:5432

Worth noting, this instance isn't at port 5432, so a bit of an odd error message.

A post on stackexchange claims that the node-postgres package doesn't accept passwords containing hashtags. The recommendation is to encode passwords using encodeURIComponent. For example:

const userPasswordDatabase = ${encodeURIComponent(database.dbPassword)}@;

@jackrsteiner jackrsteiner changed the title Connection to Postgres fails with passwords containing hashtags # Connection to Postgres fails for passwords containing hashtags # Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant