diff --git a/README.md b/README.md index 6155baf..e97e9f7 100644 --- a/README.md +++ b/README.md @@ -189,7 +189,10 @@ red PR job against. `'unsafe-hashes'` without handlers is rejected. The meta must precede every ``; + return `${meta}x${img}${frame}

`; } const BASE = "default-src 'none'; img-src 'self'; base-uri 'none'; form-action 'none'"; @@ -186,6 +187,44 @@ test("fixture: external origin must be in img-src", () => { assert.deepEqual(problemsOf(fixture({ csp: `default-src 'none'; img-src 'self' https://github.com; base-uri 'none'; form-action 'none'; script-src ${h}`, img })), []); }); +const FRAME = ''; + +test("fixture: '), ["https://example.org"]); + const h = sha256Source("console.log(1)"); + assert.deepEqual(problemsOf(fixture({ csp: `${BASE}; script-src ${h}`, frame: '' })), []); +}); + +test("fixture: external