Commit Graph

4 Commits

Author SHA1 Message Date
simoleo89 301294ecf4 fix(security): sanitize user-controlled HTML in chat & username sinks
Several dangerouslySetInnerHTML sinks rendered user-controlled strings (chat messages, usernames, chat history) without sanitisation, relying implicitly on upstream formatting or server-side charset limits. Route them all through the existing SanitizeHtml (DOMPurify) helper so the security guarantee is local to each render site.

Sinks fixed: ChatWidgetWindowView (name/message/original/translated), ChatHistoryView (name/message), AvatarInfoWidgetNameView + AvatarInfoWidgetAvatarView (username), SelectReportedUserView (username).

Add regression suites: SanitizeHtml.test.ts (XSS neutralised, chat markup preserved) and RoomChatFormatter.test.ts (pins the existing encodeHTML defence). No behaviour change: SanitizeHtml's allow-list keeps the b/i/u/span/strong/em/br markup the chat/profile UI relies on.
2026-06-17 19:00:42 +02:00
Lorenzune 9b36513def WIP preserve local changes before duckie merge 2026-04-21 11:13:32 +02:00
duckietm 458e4f6d43 🆙 Make Chatwindow text variable 2026-02-23 14:50:14 +01:00
duckietm 291fdf80dc 🆙 New: Added a new Chat window, handy for in game / building etc. 2026-02-23 13:18:35 +01:00