mdn / yari

The platform code behind MDN Web Docs
Mozilla Public License 2.0
1.17k stars 500 forks source link

"Using object URL to display image" example broken by Content Security Policy #9359

Open graue opened 1 year ago

graue commented 1 year ago

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/File_API/Using_files_from_web_applications

What specific section or headline is this issue about?

Example: Using object URLs to display images

What information was incorrect, unhelpful, or incomplete?

The example doesn't work, giving a broken image, and showing this in the console:

Content-Security-Policy: The page’s settings blocked the loading of a resource at blob:https://live.mdnplay.dev/6119bbae-9b1b-[...more hex codes omitted...] (“default-src”).

What did you expect to see?

The image I selected, displayed.

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

MDN metadata

Page report details * Folder: `en-us/web/api/file_api/using_files_from_web_applications` * MDN URL: https://developer.mozilla.org/en-US/docs/Web/API/File_API/Using_files_from_web_applications * GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/api/file_api/using_files_from_web_applications/index.md * Last commit: https://github.com/mdn/content/commit/acfe8c9f1f4145f77653a2bc64a9744b001358dc * Document last modified: 2023-07-07T07:19:19.000Z
hamishwillee commented 1 year ago

Thanks.

This is same problem as https://github.com/mdn/yari/issues/9346 - though it is a different library we'd need to add a hash for. If someone has rights, can you move this to Yari?