[DNR] Add test case for service worker redirect in DNR
Categories
(WebExtensions :: Request Handling, task, P3)
Tracking
(firefox120 fixed)
| Tracking | Status | |
|---|---|---|
| firefox120 | --- | fixed |
People
(Reporter: robwu, Assigned: robwu)
References
Details
(Whiteboard: [addons-jira])
Attachments
(1 external file)
Bug 1636629 added special code in WebRequest.jsm (verifyRedirect) that prevents extensions from trying to redirect service workers and restrictions for redirects of importScripts calls in service workers.
This check is not strictly required: if an extension redirects a service worker, then the redirect will be rejected anyway. Similarly, if the destination is an invalid scheme, then an import is rejected. We should add a unit test for DNR-triggered SW script redirection.
Note: I'm inclined to only add a test case and not raise an explicit error from DNR. This means that DNR-triggered redirects can break service workers. This is not an issue IMO: there are other redirects (in webRequest and DNR) that can also end up in a blocked redirect, and we don't prevent that from happening either. Examples are redirect to destination that would be blocked by CSP, or blocked by SRI mismatch, etc.
Updated•3 years ago
|
| Assignee | ||
Comment 1•3 years ago
|
||
| Assignee | ||
Updated•3 years ago
|
Comment 3•3 years ago
|
||
| bugherder | ||
Description
•