Skip to content

Integrity-Policy - Fix up the discrepancy with Fetch integrity metadata#135

Merged
mozfreddyb merged 1 commit into
mainfrom
clarify_empty_integrity
May 27, 2025
Merged

Integrity-Policy - Fix up the discrepancy with Fetch integrity metadata#135
mozfreddyb merged 1 commit into
mainfrom
clarify_empty_integrity

Conversation

@yoavweiss

@yoavweiss yoavweiss commented May 26, 2025

Copy link
Copy Markdown
Contributor

The current "should request be blocked by integrity policy" algorithm isn't super clear on what happens when the integrity metadata is invalid, and the fact that "integrity metadata" means different things in Fetch and in SRI doesn't help. This PR clarifies that we should deal with parsed metadata, where invalid metadata results in a empty metadata set.

This matches the tests, and seems more consistent than the alternative (avoid blocking invalid integrity metadata, which would result in a bypass of Integrity-Policy in the case of a CORS-enabled fetch).


Preview | Diff

@yoavweiss yoavweiss requested a review from mozfreddyb May 26, 2025 23:28
@mozfreddyb

Copy link
Copy Markdown
Collaborator

thanks!

@mozfreddyb mozfreddyb merged commit 94fdafe into main May 27, 2025
2 checks passed
@mozfreddyb mozfreddyb deleted the clarify_empty_integrity branch May 27, 2025 07:10
github-actions Bot added a commit that referenced this pull request May 27, 2025
…ta (#135)

SHA: 94fdafe
Reason: push, by mozfreddyb

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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