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

omit URL's password when stringifying URL for segment name #421

Open
aloababa opened this issue Oct 5, 2023 · 2 comments
Open

omit URL's password when stringifying URL for segment name #421

aloababa opened this issue Oct 5, 2023 · 2 comments

Comments

@aloababa
Copy link
Contributor

aloababa commented Oct 5, 2023

When instumenting an http.Client with an xray.Client, the segment name is based on url.URL.String which can lead to leak basic auth credentials in the segment name.

Is it possible to strip those credentials ? Or at least do the same that the stdlib does, they replace the password by a *** placeholder (like here: https://github.com/golang/go/blob/master/src/net/http/client.go#L1026)

I can see that you already strip the url query.

I can make a PR for it.

Thanks,

@atshaw43
Copy link
Contributor

If you make a PR for it, then we can review it.

@aloababa
Copy link
Contributor Author

I already make it.

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