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

Decode the user info of a database URI #3737

Merged
merged 2 commits into from Mar 10, 2019

Conversation

Projects
None yet
2 participants
@cedx
Copy link
Contributor

cedx commented Mar 1, 2019

Fixes #3716.
Does it require a test?

username: username,
password: password,
username: decodeURIComponent(username),
password: decodeURIComponent(password),

This comment has been minimized.

@pleerock

pleerock Mar 1, 2019

Member

are you sue other parameters like host shouldn't be decoded as well?

This comment has been minimized.

@cedx

cedx Mar 4, 2019

Author Contributor

In theory, we should decode every part that contains "reserved" characters (cf. https://en.wikipedia.org/wiki/Percent-encoding). In practice, in the 15 years of my career, I haven't see any hostname or database name using reserved characters.

@pleerock

This comment has been minimized.

Copy link
Member

pleerock commented Mar 1, 2019

ideally we need a test but not sure if we can setup integration test. So we probably have to make a unit test.

@cedx

This comment has been minimized.

Copy link
Contributor Author

cedx commented Mar 4, 2019

I added some unit tests.

@pleerock pleerock merged commit 358e8a1 into typeorm:master Mar 10, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@pleerock

This comment has been minimized.

Copy link
Member

pleerock commented Mar 10, 2019

Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.