Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit 0972319

Browse files
Doris TamGerrit Code Review
Doris Tam
authored and
Gerrit Code Review
committed
Merge "Security bug 1979575: Add the -dSAFER flag to ghostscript calls" into main
2 parents 2028296 + 66e240a commit 0972319

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

htdocs/export/pdf/lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ private function pdf_view_export_data() {
339339
exec('pdfunite ' . implode(' ', $collection) . ' ' . $pdfdirectory . '/' . $collectionid . '_' . $collectionname . '.pdf', $output);
340340
}
341341
else {
342-
exec('gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=' . $pdfdirectory . '/' . $collectionid . '_' . $collectionname . '.pdf -dBATCH ' . implode(' ', $collection), $output);
342+
exec('gs -dSAFER -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=' . $pdfdirectory . '/' . $collectionid . '_' . $collectionname . '.pdf -dBATCH ' . implode(' ', $collection), $output);
343343
}
344344
// remove the page pdfs that are now in collections
345345
foreach ($collection as $c) {

htdocs/export/pdflite/lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ private function pdf_view_export_data() {
323323
exec('pdfunite ' . implode(' ', $collection) . ' ' . $pdfdirectory . '/' . $collectionid . '_' . $collectionname . '.pdf', $output);
324324
}
325325
else {
326-
exec('gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=' . $pdfdirectory . '/' . $collectionid . '_' . $collectionname . '.pdf -dBATCH ' . implode(' ', $collection), $output);
326+
exec('gs -dSAFER -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=' . $pdfdirectory . '/' . $collectionid . '_' . $collectionname . '.pdf -dBATCH ' . implode(' ', $collection), $output);
327327
}
328328
// remove the page pdfs that are now in collections
329329
foreach ($collection as $c) {

0 commit comments

Comments
 (0)