Skip to content

Use safe DOM manipulation for UI messages#508

Open
cubap wants to merge 1 commit intomainfrom
401-safe-message-rendering-hardening
Open

Use safe DOM manipulation for UI messages#508
cubap wants to merge 1 commit intomainfrom
401-safe-message-rendering-hardening

Conversation

@cubap
Copy link
Member

@cubap cubap commented Mar 10, 2026

This PR hardens TPEN-interfaces against potential XSS vectors in targeted error/loading UI paths by removing dynamic HTML interpolation and using safe text rendering instead.

Replace direct innerHTML usage with replaceChildren/createElement/textContent to render error and loading UI. Adds fallbacks for missing tagName/message values and constructs DOM nodes programmatically (components/simple-transcription, interfaces/transcription, interfaces/custom, interfaces/manage-columns) to avoid accidental HTML injection and preserve existing DOM structure.
@cubap cubap requested a review from thehabes March 10, 2026 18:31
@github-actions
Copy link
Contributor

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