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

Limit flutter service worker cache to flutter resources. #147940

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JamMarHer
Copy link

@JamMarHer JamMarHer commented May 7, 2024

It is currently possible for the Flutter service worker to recognize other website requests as app resources. This can lead to caching sensitive data. This PR adds a new check to the fetch event listener to prevent caching all requests and to only attempt to handle flutter resources.

Fixes: #103176
Related: #103054

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Copy link

google-cla bot commented May 7, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label May 7, 2024
@JamMarHer JamMarHer marked this pull request as ready for review May 8, 2024 13:04
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@andrewkolos
Copy link
Contributor

andrewkolos commented May 16, 2024

@JamMarHer per the bot comment, this change will need to be under test before we can review it. Consider adding a test. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[web-platform] flutter service worker cache is not skipping requests to other sites
2 participants