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

Unable to escape database password #413

Open
jjj333-p opened this issue Mar 31, 2024 · 1 comment
Open

Unable to escape database password #413

jjj333-p opened this issue Mar 31, 2024 · 1 comment

Comments

@jjj333-p
Copy link

brain fried will fill out later as needed but ill try to give the gist here.

my password for postgres has a ' in it.

the environment vars passes in a long string which go then parces.

one of those is where you set the password

ive set it using password=$(cat p) in bash but that doesnt work with systemd env vars.

i changed the db password and it is fine for me, but maybe this is worth fixing?

@Circenn5130
Copy link

Try %27
See this https://en.wikipedia.org/wiki/Percent-encoding and this https://www.postgresql.org/docs/current/libpq-connect.html
Do a find in the postgres link to drop right to the section "The connection URI needs to be encoded with percent-encoding"

Example Password
iL0v3ch'ck3n

Percent-encoded Password
iL0v3ch%27ck3n

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

2 participants