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-decode DB user/password to allow special chars #139

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

zyv
Copy link

@zyv zyv commented Nov 3, 2020

Hello,

We have learned the hard way that unfortunately this buildpack doesn't support special characters (specifically @) in usernames and passwords. These characters should be URL-encoded - see e.g. how Django package that adds support for DATABASE_URL handles it:

https://github.com/jacobian/dj-database-url/blob/master/dj_database_url.py#L124

However, the buildpack doesn't decode them and therefore uses wrong passwords for user list and database.

This commit adds decoding to the buildpack and thus fixes the issue /cc @marns93 .

All the best,
Yury

@zyv
Copy link
Author

zyv commented Mar 8, 2025

Hi @edmorley / @mble-sfdc, would you consider merging this bugfix or should I close it as rejected? I'd like to get it off my list. Thank you very much!

@edmorley edmorley requested a review from mble-sfdc March 8, 2025 14:57
@mble-sfdc
Copy link
Contributor

@zyv Thanks for the PR, and apologies for not reviewing it sooner. Would you mind if I took care of the conflicts, add testing etc?

@zyv
Copy link
Author

zyv commented Mar 10, 2025

Of course I don't mind, please go ahead and thank you! @mble-sfdc

mble-sfdc added a commit that referenced this pull request Mar 10, 2025
With much thanks to @zyv, this commit adds support for URI-encoded
user/pass combinations. We decode URI-encoded user/pass combinations for
use in `users.txt`, but keep the encoded versions for the exported
pgBouncer URIs.

Ref: #139
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 this pull request may close these issues.

2 participants