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

URL encoded passwords are getting decoded in env.py #26029

Open
ramki88 opened this issue Nov 20, 2023 · 0 comments · May be fixed by #26094
Open

URL encoded passwords are getting decoded in env.py #26029

ramki88 opened this issue Nov 20, 2023 · 0 comments · May be fixed by #26094
Assignees

Comments

@ramki88
Copy link

ramki88 commented Nov 20, 2023

decoded_uri = urllib.parse.unquote(DATABASE_URI)

As suggested in psycopg/psycopg2#1546 (comment) we are using urllib.parse.quote(DB_PASSWORD) as the password contains special characters. But in the above line it gets decoded. Hence the host name is not getting resolved as part of the password is taken as host. Currently as a workaround line 45 is replaced with decoded_uri = DATABASE_URI.replace("%", "%%")

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

Successfully merging a pull request may close this issue.

2 participants