Homestyx hydra
Diffusion hydra 16d9cc12af45

Enforce viewable MIME types config on PDF documents

Description

Enforce viewable MIME types config on PDF documents

Summary:
Let instance admins decide whether to allow PDFs to be viewable as a Web page. See https://github.com/mozilla-conduit/phabricator/commit/5ec132bf9ebfb90558f1b7f646772176629f86d0.

MOZILLA: Instead of always allowing PDFs to be viewable in the web UI, [...]
This checks that the PDF mimetype is viewable according to the system
configuration.

Ref Q83.

Test Plan:

  1. Set files.viewable-mime-types to exclude application/pdf.
  2. Upload a pdf file.
  3. See "No document engine can render the contents of this file." in web UI.

Reviewers: O1 Blessed Committers, speck

Reviewed By: O1 Blessed Committers, speck

Subscribers: speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25464

Details

Provenance
Zero KingAuthored on Nov 11 2023, 2:45 AM
sirocylPushed on Oct 16 2024, 5:49 AM
Parents
R1:5d80b3fd88d1: Fix PHP 8.1 "strlen(null)" exception rendering PHUISegmentBar without a label
Branches
Unknown
Tags
Unknown

Event Timeline