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

Change Raven filter's secure_headers config to be case insensitive #4

Merged
merged 2 commits into from
Sep 21, 2017
Merged

Conversation

osyoyu
Copy link
Contributor

@osyoyu osyoyu commented Sep 12, 2017

This PR allows HTTP header names passed to RavenParameterFilterProcessor#create to be capitalized.

When RavenParameterFilterProcessor checks if a HTTP header is included in @header_filters, it downcases ONLY the request's header:

if self.class.header_filters.include?(k.downcase)

This means that if the user capitalizes a header name in secure_headers, it just slips through the filter, and the content goes out to Sentry. This is pretty much confusing.

Wouldn't it be nicer to just downcase header_filters at the library side?

@osyoyu
Copy link
Contributor Author

osyoyu commented Sep 12, 2017

@cookpad/dev-infra

@hogelog
Copy link
Contributor

hogelog commented Sep 12, 2017

No spec?

@osyoyu
Copy link
Contributor Author

osyoyu commented Sep 12, 2017

Specs coming up 👍

@osyoyu
Copy link
Contributor Author

osyoyu commented Sep 21, 2017

See 2e8c3dd

Copy link

@riseshia riseshia left a comment

Choose a reason for hiding this comment

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

:shipit:

Copy link
Contributor

@hogelog hogelog left a comment

Choose a reason for hiding this comment

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

👍

@hogelog hogelog merged commit 873bfe6 into cookpad:master Sep 21, 2017
@hogelog
Copy link
Contributor

hogelog commented Sep 21, 2017

@osyoyu
Copy link
Contributor Author

osyoyu commented Sep 21, 2017

domo arigato 💯

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