Closed Bug 1535190 Opened 2 years ago Closed 2 years ago

Make sure inline attachments are displayed properly

Categories

(bugzilla.mozilla.org :: User Interface, defect)

Production
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: kohei.yoshino, Unassigned)

References

Details

Attachments

(1 file)

46 bytes, text/x-github-pull-request
Details | Review

I see a CSP error in the browser console:

Content Security Policy: The page’s settings blocked the loading of a resource at https://bug994896.bmoattachments.org/attachment.cgi?id=8776056 (“connect-src”).

Also: just like obsolete ones, deleted attachments should not be displayed.

Summary: Inline text attachments are not displayed due to CSP → Fix Inline text attachments not displayed due to CSP; prevent deleted attachments from being displayed

Maybe we should remove the text attachment support. Adding CSP and CORS solves the issue, and this code only loads text attachments, but connect-src is a bit powerful stuff.

Summary: Fix Inline text attachments not displayed due to CSP; prevent deleted attachments from being displayed → Inline attachments: remove text support and hide deleted ones
Attached file GitHub Pull Request
Summary: Inline attachments: remove text support and hide deleted ones → Inline attachments: remove text preview and hide deleted attachments
  • Load text files via REST API
  • Make sure the Prism.js works properly
  • Make sure not to load GitHub and Phab requests
  • Stop showing deleted attachments mainly on Firefox OS bugs
  • Add media-src for <video>/<audio> attachments so these can be loaded from bmoattachments.org
Summary: Inline attachments: remove text preview and hide deleted attachments → Make sure inline attachments are displayed properly

Merged to master.

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Component: User Interface: Modal → User Interface
Assignee: kohei.yoshino → nobody
You need to log in before you can comment on or make changes to this bug.