Registry Mirror
Skip to content

Conversation

@backnotprop

Copy link
Copy Markdown
Owner

HTML pages shown in Plannotator (raw-HTML annotate, plan review's raw HTML, the Inbox's attached and linked pages) run in a sandboxed srcdoc frame without allow-modals, so alert(), confirm() and prompt() were ignored. The owner approved allowing them: these are people's own pages and local sites.

  • HtmlViewer's srcdoc frame: sandbox="allow-scripts allow-modals" (new HTML_VIEWER_SANDBOX).
  • The CSP sandbox on embedded documents and Inbox pages: HTML_ASSET_DOCUMENT_CSP is now sandbox allow-scripts allow-modals (and INBOX_HTML_DOCUMENT_CSP through it), so an embed inside the frame, which gets the intersection of both, can open them too.
  • Nothing else: no allow-same-origin, no popup change. The live-app frame is unsandboxed and unchanged.
  • iframeIsolation.test.ts pins allow-modals present and allow-same-origin absent on both; tests pinning the old strings updated.

Fixes #2063.

Add allow-modals to the srcdoc viewer's sandbox (HTML_VIEWER_SANDBOX) and to
the CSP sandbox on embedded and Inbox HTML documents (HTML_ASSET_DOCUMENT_CSP,
and INBOX_HTML_DOCUMENT_CSP through it). Nothing else changes: no
allow-same-origin, no popups. Owner-approved.
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.

[Bug] HTML rendered in sandboxed iframe blocks alert() / confirm() / prompt() — add allow-modals or forward dialogs to parent UI

1 participant