-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Make it more difficult to accidentally log sensitive headers #6551
Conversation
@@ -249,6 +249,14 @@ fun String.canParseAsIpAddress(): Boolean { | |||
return VERIFY_AS_IP_ADDRESS.matches(this) | |||
} | |||
|
|||
/** Returns true if we should void putting this this header in an exception or toString(). */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** Returns true if we should void putting this this header in an exception or toString(). */ | |
/** Returns true if we should void putting this header in an exception or toString(). */ |
@@ -249,6 +249,14 @@ fun String.canParseAsIpAddress(): Boolean { | |||
return VERIFY_AS_IP_ADDRESS.matches(this) | |||
} | |||
|
|||
/** Returns true if we should void putting this this header in an exception or toString(). */ | |||
fun isSensitiveHeader(name: String): Boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be a public API feature?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t think so. It’s the sort of thing you don’t know you need until it’s too late.
Failing job looks like it's just circleci being woefully under provisioned recently https://app.circleci.com/pipelines/github/square/okhttp/4508/workflows/b41ede5e-98f7-4d2d-9dd4-79e655f4838f/jobs/20469 |
…6740) Co-authored-by: Jesse Wilson <[email protected]>
No description provided.