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
|
// MV2 takes the policy as a bare string. Firefox does not require
|
||||||
// 'wasm-unsafe-eval' for MV2 today — enforcement is report-only and
|
// 'wasm-unsafe-eval' for MV2 today — enforcement is report-only and
|
||||||
// Bugzilla 1770909 is still open — so this is future-proofing, not a
|
// Bugzilla 1770909 is still open — so that token is future-proofing
|
||||||
// mandate. It does not weaken anything under either baseline: Gecko's
|
// for when it lands, not a mandate, and it stays inside Firefox's MV2
|
||||||
// real MV2 default (extensions.webextensions.default-content-security-
|
// base-CSP ceiling. object-src 'self' is the load-bearing half: a
|
||||||
// policy) is `script-src 'self' 'wasm-unsafe-eval';` with no object-src
|
// Firefox before 106 rejects an MV2 policy string that omits
|
||||||
// at all, so this string leaves script-src unchanged and ADDS
|
// object-src and falls back to its own default, discarding everything
|
||||||
// object-src 'self', constraining <object>/<embed> sources that were
|
// declared here. Same policy as Chrome, different manifest shape.
|
||||||
// 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.
|
|
||||||
test("firefox MV2 allows WASM and nothing else beyond 'self'", () => {
|
test("firefox MV2 allows WASM and nothing else beyond 'self'", () => {
|
||||||
const csp = readManifest("firefox").content_security_policy;
|
const csp = readManifest("firefox").content_security_policy;
|
||||||
expect(typeof csp).toBe("string");
|
expect(typeof csp).toBe("string");
|
||||||
|
|||||||
Reference in New Issue
Block a user