Following the deployment of Wikimedia's Content-Security-Policy, the following user-script(s) are no longer fully working:
- https://www.wikidata.org/w/index.php?title=User:Lectrician1/discographies3.js
- https://www.wikidata.org/w/index.php?title=User:Lectrician1/embeds.js
(I don't use these scripts, but splitting this out of a user-report at T419154#11687907 to prevent someone else from needing to file a task about this when we've already been made aware of it on-Phab. cc @Moebeus @Lectrician1 FYI)
Loading discographies3.js while viewing https://www.wikidata.org/wiki/Q17544624 results in the following CSP errors in my browser's console:
Loading the stylesheet 'https://cdn.datatables.net/1.12.1/css/jquery.dataTables.css' violates the following Content Security Policy directive: [...] Loading the script 'https://cdn.datatables.net/1.12.1/js/jquery.dataTables.js' violates the following Content Security Policy directive: [...]
embeds.js is un-minified, and (from reading the code) seems like it could be making requests to:
- open.spotify.com
- embed.music.apple.com
- embed.podcasts.apple.com
- www.youtube.com
- widget.deezer.com
- genius.com
- w.soundcloud.com
- embed.tidal.com
- platform.twitter.com
- www.facebook.com
- player.vimeo.com
- store.steampowered.com
- www.kickstarter.com
- www.pinterest.com
- assets.pinterest.com
- www.mixcloud.com
- music.amazon.com
- www.iheart.com
- www.tiktok.com
- www.nfb.ca
(Side-note: Writing out this list of domain-names above is making me wonder even more about whether, at least in the medium/long-term, MediaWiki will need a better way of dealing with the CSP implications of on-wiki scripts that call to external sites. Some variation of this idea noted by @Bawolff (AIUI, for gadgets/scripts to be able to tell MediaWiki what external sites they'll be calling) seems like an interesting possible idea on its face, to think about.)




