@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator

Enforce viewable MIME types config on PDF documents master

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


+14 -10
2 changed files