xtermjs/xterm.js
Auf GitHub ansehenLatest version requires unsafe-inline due to inline styles
Open
#4.445 geöffnet am 23. März 2023
help wantedtype/enhancement
Repository-Metriken
- Stars
- (16.196 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 4T 3h) (81 gemergte PRs in 30 T)
Beschreibung
Content Security Policies need to be set to 'unsafe-inline' to work with xterm.js. Older versions didn't use inline styles so this wasn't an issue.
Ideally xterm should stop using inline styles or support a user-provided nonce value that can be set in the CSP. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src
Details
- Browser and browser version: all
- OS version: all
- xterm.js version: 5.1.0
Steps to reproduce
- Set a content security policy like "style-src 'self';"
- Make an xterm that has a resizable container
- Resizing causes CSP errors in the console.
- Resizing doesn't work properly