Compare commits
1 Commits
741a16ad9b
...
69bcbdb03a
| Author | SHA1 | Date | |
|---|---|---|---|
| 69bcbdb03a |
@@ -81,15 +81,12 @@ describe("shipped Content Security Policy", () => {
|
||||
|
||||
// MV2 takes the policy as a bare string. Firefox does not require
|
||||
// 'wasm-unsafe-eval' for MV2 today — enforcement is report-only and
|
||||
// Bugzilla 1770909 is still open — so this is future-proofing, not a
|
||||
// mandate. It does not weaken anything under either baseline: Gecko's
|
||||
// real MV2 default (extensions.webextensions.default-content-security-
|
||||
// policy) is `script-src 'self' 'wasm-unsafe-eval';` with no object-src
|
||||
// at all, so this string leaves script-src unchanged and ADDS
|
||||
// object-src 'self', constraining <object>/<embed> sources that were
|
||||
// previously unrestricted. Against MDN's documented MV2 default
|
||||
// (`script-src 'self'; object-src 'self';`) it is a one-token loosening,
|
||||
// identical to Chrome. Same policy, different manifest shape.
|
||||
// Bugzilla 1770909 is still open — so that token is future-proofing
|
||||
// for when it lands, not a mandate, and it stays inside Firefox's MV2
|
||||
// base-CSP ceiling. object-src 'self' is the load-bearing half: a
|
||||
// Firefox before 106 rejects an MV2 policy string that omits
|
||||
// object-src and falls back to its own default, discarding everything
|
||||
// declared here. Same policy as Chrome, different manifest shape.
|
||||
test("firefox MV2 allows WASM and nothing else beyond 'self'", () => {
|
||||
const csp = readManifest("firefox").content_security_policy;
|
||||
expect(typeof csp).toBe("string");
|
||||
|
||||
Reference in New Issue
Block a user