preserve referrer & referrerPolicy metadata in asset requests#69413
Open
SkyZeroZx wants to merge 2 commits into
Open
preserve referrer & referrerPolicy metadata in asset requests#69413SkyZeroZx wants to merge 2 commits into
referrer & referrerPolicy metadata in asset requests#69413SkyZeroZx wants to merge 2 commits into
Conversation
Preserve referrer metadata when the service worker reconstructs asset requests for cache-busted and redirected asset fetches. For example, an attacker with access to asset host logs could receive a reset token embedded in a page URL if the reconstructed request falls back to default referrer behavior instead of carrying referrer: ''.
Preserve explicit referrer policy when the service worker reconstructs asset requests for cache-busted and redirected asset fetches. For example, an application can load a script or image with referrerPolicy: 'same-origin' or 'origin' to limit referrer data. Dropping that policy can expose more of the current URL to that resource host.
61ab9e1 to
a7f52e5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(service-worker): preserve empty referrer in asset requests
Preserve explicit referrer: '' when the service worker reconstructs asset requests for cache-busted and redirected asset fetches.
For example, an attacker with access to asset host logs could receive a reset token embedded in a page URL if the reconstructed request falls back to the default referrer behavior.
Also, we can see a similar behavior in the recent fix for the HTTP client
See #69171 (comment)
fix(service-worker): preserve referrer policy in asset requests
Preserve explicit referrer policy when the service worker reconstructs asset requests for cache-busted and redirected asset fetches.
For example, an application can load a script or image with referrerPolicy: 'same-origin' or 'origin' to limit referrer data. Dropping that policy can expose more of the current URL to that resource host.