container: Allow converting more document formats#378
Merged
apyrgio merged 2 commits intorelease-0.4.1from Mar 28, 2023
Merged
Conversation
deeplow
reviewed
Mar 28, 2023
deeplow
reviewed
Mar 28, 2023
Remove the association between MIME types and export filters, because LibreOffice is able to auto-detect them on its own. Instead, ask LibreOffice to simply convert the document to a .pdf. This association was cumbersome for yet another reason; there are MIME types that may be associated with more than one file type. That's why it's better to let LibreOffice decide the proper filter for the conversion. Our current understanding is that this change won't widen our attack surface for the following reasons: * The output filters for PDF documents are pretty specific, and we don't affect the input filters somehow. * The default behavior of LibreOffice on Alpine Linux is to disable macros. Closes #369
The main use of safe mode [1] in LibreOffice is to run with a fresh user profile, in case the default one got borked somehow. This is actually not a concern of ours, since the user's profile is in the container and is not persistent. The main reason we want to preemptively run LibreOffice in safe mode is to remove hardware acceleration capabilities. Whether hardware acceleration actually works in a container is another question, but we want to be extra sure. [1]: https://help.libreoffice.org/latest/en-US/text/shared/01/profile_safe_mode.html
deeplow
approved these changes
Mar 28, 2023
apyrgio
added a commit
that referenced
this pull request
Apr 3, 2023
In PR #378 ("container: Allow converting more document formats"), we added support for the following MIME types: * application/zip * application/octet-stream * application/x-ole-storage * application/vnd.oasis.opendocument.spreadsheet-template * application/vnd.oasis.opendocument.text-template However, we forgot to add some tests for these MIME types in the repo. In this commit, we add a file for each of these MIME types, to make sure we have no regressions in the future.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove the association between MIME types and export filters, because
LibreOffice is able to auto-detect them on its own. Instead, ask
LibreOffice to simply convert the document to a .pdf.
This association was cumbersome for yet another reason; there are MIME
types that may be associated with more than one file type. That's why
it's better to let LibreOffice decide the proper filter for the
conversion.
Our current understanding is that this change won't widen our attack
surface for the following reasons:
affect the input filters somehow.
macros.
acceleration and make sure that macros are not invoked as well.
Closes #369
(must be merged after #377)