Skip to content

fix(csp): retain Document policy when opening an input stream - #2751

Open
ldm0 wants to merge 1 commit into
mainfrom
split/solid-document-open-csp-retention-20261112
Open

ldm0 wants to merge 1 commit into
mainfrom
split/solid-document-open-csp-retention-20261112

Conversation

@ldm0

@ldm0 ldm0 commented Nov 12, 2026

Copy link
Copy Markdown
Member

Retain installed Content Security Policy when document.open reuses a Document, and process meta elements in its new input stream without resetting other Documents.

Covers top-level and child Window eval realms, plus lightweight popup code generation through main's existing native javascript-URL task path. Checks delivered policy retention, stricter reinserted meta policies and same-Document identity after repeated reopen, while preserving other Documents' processed-meta state. Live blob-worker policy sources and borrowed popup intrinsics require unmerged infrastructure and are excluded from this extraction. The popup fixture explicitly removes meta before reopening: main's legacy popup stream retains its head, and full popup stream replacement is a separate prerequisite. The stricter policy must survive both element removal and reopening.

Ported from development commit 29cb9a67395f.

Validation on 62bec1ed80c22219756f16556a3ec4447e3ebe2a:

  • cargo fmt --all
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo nextest run --no-fail-fast — Summary [ 205.261s] 22909 tests run: 22909 passed (1 slow), 20 skipped; zero retries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant