Problem Statement
Not sure if this lib is still actively maintained but some of our apps still depend on it and use it
ReactXP framework should support Trusted Types API so that it can be seamlessly integrated with web applications that enforce Trusted Types for all DOM XSS Injection Sinks (e.g. assignments to Element.innerHTML property) using require-trusted-types-for CSP directive. Trusted Types APIs are now fully supported in web browsers based on Blink engine (Chrome, Edge, Electron and others).
Proposed solution
First we need to identify all instances where ReactXS integrates with such methods and propose re-factoring. We need to be careful to keep supporting web browsers without Trusted Types support and, obviously, mobile platforms (iOS and Android).
We know about these locations so far:
- Assigning empty string into Element.innerHTML
- Assigning static HTML into Element.innerHTML
- Assigning dynamic HTML into HTMLIFrameElement.srcdoc
- This is in extension, we can maybe ignore or pass content through HTML sanitizer such as DOMPurify
|
(iframeDOM as any).srcdoc = html; |
References
Problem Statement
Not sure if this lib is still actively maintained but some of our apps still depend on it and use it
ReactXP framework should support Trusted Types API so that it can be seamlessly integrated with web applications that enforce Trusted Types for all DOM XSS Injection Sinks (e.g. assignments to Element.innerHTML property) using require-trusted-types-for CSP directive. Trusted Types APIs are now fully supported in web browsers based on Blink engine (Chrome, Edge, Electron and others).
Proposed solution
First we need to identify all instances where ReactXS integrates with such methods and propose re-factoring. We need to be careful to keep supporting web browsers without Trusted Types support and, obviously, mobile platforms (iOS and Android).
We know about these locations so far:
reactxp/src/web/CustomScrollbar.ts
Line 263 in 6b6c56f
reactxp/src/web/CustomScrollbar.ts
Line 427 in 6b6c56f
reactxp/src/web/CustomScrollbar.ts
Line 432 in 6b6c56f
reactxp/src/web/CustomScrollbar.ts
Line 249 in 6b6c56f
reactxp/extensions/webview/src/web/WebView.tsx
Line 101 in 6b6c56f
References