8000 fix(artifacts): stop artifact blobs opening as scriptable documents by wyf7107 · Pull Request #514 · google/adk-web · GitHub
[go: up one dir, main page]

Skip to content

fix(artifacts): stop artifact blobs opening as scriptable documents - #514

Merged
copybara-service[bot] merged 1 commit into
google:mainfrom
wyf7107:main
Aug 26, 2026
Merged

copybara-service[bot] merged 1 commit into
google:mainfrom
wyf7107:main

Conversation

@wyf7107
@wyf7107 wyf7107 commented Aug 26, 2026
Copy link
Copy Markdown
Collaborator

openBase64InNewTab built the blob with the artifact's own MIME type and handed it to window.open. A blob URL inherits the origin of the page that created it, so a text/html or image/svg+xml artifact opened in a tab ran with the Dev UI's origin and a live window.opener handle back into the session. Artifact bytes are untrusted: an agent, a tool, or an upload produces them.

Downgrade the blob type to application/octet-stream for MIME types the browser parses into a scriptable document, so those artifacts download rather than render. Inert types are unchanged.

openBase64InNewTab built the blob with the artifact's own MIME type and
handed it to window.open. A blob URL inherits the origin of the page that
created it, so a text/html or image/svg+xml artifact opened in a tab ran
with the Dev UI's origin and a live window.opener handle back into the
session. Artifact bytes are untrusted: an agent, a tool, or an upload
produces them.

Downgrade the blob type to application/octet-stream for MIME types the
browser parses into a scriptable document, so those artifacts download
rather than render. Inert types are unchanged.
@copybara-service
copybara-service Bot merged commit 33c3568 into google:main Aug 26, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0