Add Content Security Policy to Dweets
See original GitHub issueCurrently, it’s possible to write a dweet that pulls in resources from outside sources (scripts, images, videos, etc).
A content security policy (CSP) can be used to block external resources from being loaded on dweet pages (//dweet.dwitter.net/id/####/
- the inner page of the iframe).
This would block dweets from pulling in external resources, which can be used as a means of bypassing the 140 byte limit or to execute cross-site request forgeries.
Making this change does come with one caveat, which is that it would break any existing dweets that make use of external resources. Not to pick on cantelope specifically, but here are some of his dweets as examples:
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Content-Security-Policy Header CSP Reference & Examples
The new Content-Security-Policy HTTP response header helps you reduce XSS risks on modern browsers by declaring which dynamic resources are allowed to load....
Read more >Content Security Policy (CSP) - HTTP - MDN Web Docs
Chrome Edge
Content‑Security‑Policy Full support. Chrome25. more. Toggle history Full sup...
base‑uri Full support. Chrome40. Toggle history Full sup...
block‑all‑mixed‑content. Deprecated Full support. ChromeYes. Toggle history...
Read more >x-content-security-policy header - WordPress.org
To enable CSP, you need to configure your web server to return the Content-Security-Policy HTTP header. (Sometimes you may see mentions of the...
Read more >Figure out how to load site with Content-Security-Policy ...
Currently we strip "content-security-policy" when loading documents. allow rewriting this header in a plugin to only strip what is preventing ...
Read more >Content Security Policy: A successful mess between ...
In this talk, we distill our multi-year experience fighting XSS at Google with nonce-based Content Security Policy (CSP), one of the most ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@atesgoral For example, a dweet containing the following snippet could be used to force users to log out of the site:
This is completed now, but see #367 for some remaining issues. Closing