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

Truncate the URL at the API key when logging to prevent the clear API #3466

Merged
merged 1 commit into from
Aug 8, 2017

Conversation

derekwbrown
Copy link
Contributor

key from appearing in the log.

What does this PR do?

Skims off everything after "api_key=" in the URL when logging, so that the API key doesn't get logged in the clear.

Motivation

customer request.

Additional Notes

Intentionally didn't use the code for replacing the key with "****". As this will be executed each time, whether the agent is logging in debug or not, didn't want to incur the additional overhead.

Copy link
Contributor

@gmmeyer gmmeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you use the same sanitizer we use for the flare? I think it would be easier.

@derekwbrown derekwbrown merged commit 9378706 into master Aug 8, 2017
@olivielpeau olivielpeau added this to the 5.17 milestone Aug 21, 2017
@olivielpeau olivielpeau deleted the db/clean_url_apikey branch August 21, 2017 17:13
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.

3 participants