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

fix(csp): Parse 'violated-directive: default-src' [INGEST-912] #1174

Merged
merged 3 commits into from
Feb 1, 2022

Conversation

jjbayer
Copy link
Member

@jjbayer jjbayer commented Jan 31, 2022

It seems that a use case reported in getsentry/sentry#31433
does not work since #1144.

This PR attempts to revert those changes while keeping clippy happy.

@jjbayer jjbayer requested review from a team and jan-auer January 31, 2022 13:29
@@ -363,7 +365,7 @@ impl CspRaw {
None => "",
};

match original_uri.split_once(':').unwrap_or_default().0 {
match original_uri.split_once(':').map_or(original_uri, |x| x.0) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure about this one, I did not add a test for it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Wrote a test and slightly changed the behavior: db267b1

@jjbayer jjbayer requested a review from jan-auer February 1, 2022 12:41
@jjbayer jjbayer merged commit 9ca8503 into master Feb 1, 2022
@jjbayer jjbayer deleted the fix/csp-report-firefox branch February 1, 2022 13:30
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.

2 participants