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

Password not removed when connecting to MySQL #131

Closed
zijima opened this issue Jul 11, 2019 · 3 comments
Closed

Password not removed when connecting to MySQL #131

zijima opened this issue Jul 11, 2019 · 3 comments

Comments

@zijima
Copy link

zijima commented Jul 11, 2019

Hi,

I'm trying to open a new SQL connection this required DSN format::

user:password@(host:port)/database

However, the password section is not removed from connection string therefore i'm able to see the full DSN, including pwd, when i open traces in AWS XRay service Console.

Looks like current code can handle case like:

user:password@host:port/database

But not the one with ()

Source code also mentioned current logic is based on surveys from 2017.

Any chance you can include parsing the DSN format i needed?

thanks

@luluzhao
Copy link
Contributor

@zijima thank you for contacting us regarding your issue. We will add this into our backlog and in the meantime, A PR is always welcomed.

@zijima
Copy link
Author

zijima commented Jul 18, 2019

It turns out that my DSN failed url.parse because my password has characters like [ and ] which is treated as invalid user info :(

i have a suggestion to handle the net/url: invalid userinfo error and remove password from the url

@bhautikpip
Copy link
Contributor

Hi @zijima,

We have recently merged one PR which solves this issue (https://github.com/aws/aws-xray-sdk-go/pull/169/files#diff-5bba2290697477468cb32ac08c47bd3aR733). So, I am closing this issue for now. Feel free to reopen an issue if you see any more issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants