| Summary: | REGRESSION (iOS 16): Worker content security policy limits outer page | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Nicholas Butko <nb> |
| Component: | Service Workers | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED WONTFIX | ||
| Severity: | Normal | CC: | bfulgham, cdumez, christoph, rigel, tony, webkit-bug-importer, wilander, youennf |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | iPhone / iPad | ||
| OS: | Other | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=245530 | ||
|
Description
Nicholas Butko
2022-09-15 15:33:26 PDT
To provide some additional background, we found that the discrepancy was not related to CSP, but instead the Content-Type header. It seems like the Content-Type did not affect this before, so there would have been a breaking change since iOS 15.7. We can see the behavior in the following demo. For the correct behavior, we should load and see messages from all 3 workers, but on iOS 16.0, we only see one. We also don't get any indication on why it failed. Example: https://nova-acoustic-lightyear.glitch.me/ Source: https://glitch.com/edit/#!/nova-acoustic-lightyear ResourceResponseBase mimeType is either empty or application/octet-stream in the last two cases. The mime type check then fails. It might be a regression from hardening done in https://bugs.webkit.org/show_bug.cgi?id=236411 Safari latest implementation is aligned with the spec and Firefox. Chrome is doing some work to align with the spec as well though this has not shipped yet. @Nicholas, @Christoph, were you able to fix this on server side? If so, I would be tempted to mark this as 'Behave as expected'. In that case, the unexpected thing is that onerror handler returns an Event that is not an ErrorEvent, and that it has no message about the nature of the error. We could have diagnosed and fixed the issue a lot faster if there was a message like "Invalid mime type for worker: application/octet-stream" (In reply to Nicholas Butko from comment #5) > In that case, the unexpected thing is that onerror handler returns an Event > that is not an ErrorEvent, and that it has no message about the nature of > the error. We could have diagnosed and fixed the issue a lot faster if there > was a message like "Invalid mime type for worker: application/octet-stream" Right, would logging an error in the JS console with such message be good enough? I filed https://bugs.webkit.org/show_bug.cgi?id=245530 to follow-up on adding console logging to help web developer investigations. Tentatively marking as WontFix given the potential server-side fix and the fact we are aligned to the spec and Firefox, and the desire to Chrome to align in the short future. |