Mitigate XSS vulnerabilities in the playground where AI-generated content is rendered without sanitization, allowing potential script injection via prompt injection attacks. MarkdownRenderer.jsx: - Replace dangerouslySetInnerHTML with a sandboxed iframe for HTML preview - Use sandbox="allow-same-origin" to block script execution while allowing CSS rendering and iframe height auto-sizing - Add SandboxedHtmlPreview component with automatic height adjustment CodeViewer.jsx: - Add escapeHtml() utility to encode HTML entities before rendering - Rewrite highlightJson() to process tokens iteratively, escaping each token and structural text before wrapping in syntax highlighting spans - Escape non-JSON and very-large content paths that previously bypassed sanitization - Update linkRegex to correctly match URLs containing & entities These changes only affect the playground (AI output rendering). Admin- configured content (home page, about page, footer, notices) remains unaffected as they use separate code paths and are within the trusted admin boundary.
| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| ChatArea.jsx | Loading commit data... | |
| CodeViewer.jsx | Loading commit data... | |
| ConfigManager.jsx | Loading commit data... | |
| CustomInputRender.jsx | Loading commit data... | |
| CustomRequestEditor.jsx | Loading commit data... | |
| DebugPanel.jsx | Loading commit data... | |
| FloatingButtons.jsx | Loading commit data... | |
| ImageUrlInput.jsx | Loading commit data... | |
| MessageActions.jsx | Loading commit data... | |
| MessageContent.jsx | Loading commit data... | |
| OptimizedComponents.js | Loading commit data... | |
| ParameterControl.jsx | Loading commit data... | |
| SSEViewer.jsx | Loading commit data... | |
| SettingsPanel.jsx | Loading commit data... | |
| ThinkingContent.jsx | Loading commit data... | |
| configStorage.js | Loading commit data... |