Skip to content

Harden WebUI done-frame stats against markup injection - #285

Merged
jkyberneees merged 1 commit into
mainfrom
fix/webui-stats-innerhtml-hardening
Sep 30, 2026
Merged

jkyberneees merged 1 commit into
mainfrom
fix/webui-stats-innerhtml-hardening

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

Replaces the innerHTML assignment for per-message turn stats with DOM construction (createElement/textContent). Extracts turnStatsSpans so the footer data is plain, numeric-coerced spans, and escapes the HTML renderer as defense in depth. Pinned with node tests: hostile done-frame values render inert.

Replace the innerHTML assignment for per-message turn stats with DOM
construction (createElement/textContent). Extract turnStatsSpans from
turnStatsHTML so the footer data is plain, numeric-coerced spans, and
escape the HTML renderer's title/text as defense in depth. Pin the
invariant with node tests: hostile done-frame values must render inert.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
odek fcd4ae2 Commit Preview URL

Branch Preview URL
Sep 30 2026, 11:59 AM

@jkyberneees
jkyberneees merged commit 0510185 into main Sep 30, 2026
10 checks passed
@jkyberneees
jkyberneees deleted the fix/webui-stats-innerhtml-hardening branch September 30, 2026 12:04
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