SECURITY: Add -dSAFER to ghostscript as a hardening measure

-dSAFER disables certain scary features of ghostscript
(like arbitrary file access). Its primarily about postscript
security, but enable it for pdfs to be safe.

Bug: T136402
Change-Id: I0ab37ddb5d134334e975bc07d3b9ba7bfc7a5659
This commit is contained in:
Brian Wolff 2016-06-13 04:52:21 -04:00 committed by Chad
parent b3a126f55e
commit e1d584ec6c

View file

@ -201,6 +201,7 @@ class PdfHandler extends ImageHandler {
"-sOutputFile=-",
"-dFirstPage={$page}",
"-dLastPage={$page}",
"-dSAFER",
"-r{$wgPdfHandlerDpi}",
"-dBATCH",
"-dNOPAUSE",