Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open LibreOffice files in sd-svs-disp VMs #266

Closed
emkll opened this issue Jun 6, 2019 · 2 comments
Closed

Open LibreOffice files in sd-svs-disp VMs #266

emkll opened this issue Jun 6, 2019 · 2 comments

Comments

@emkll
Copy link
Contributor

emkll commented Jun 6, 2019

While LibreOffice is installed as part of #263, LibreOffice documents do not automatically open in the disposable VMs:
Screenshot_2019-06-03_12-00-59

We should ensure LibreOffice files open automatically once they are send to an sd-svs-disp DispVM.

Originally uncovered as part of #263 (review) , relevant parts copy pasted below for convenience:

This is because xdg-open relies on the file extension and not magic numbers (file appears to rely on a file's magic numbers)

user@sd-svs-disp:$ xdg-mime query filetype 1-single-celled_authorship-doc 
application/zip
user@sd-svs-disp:$ file --mime-type 1-single-celled_authorship-doc 
1-single-celled_authorship-doc: application/vnd.openxmlformats-officedocument.wordprocessingml.document

Changing the extension does change the association:

user@sd-svs-disp:$ mv 1-single-celled_authorship-doc 1-single-celled_authorship-doc.doc
user@sd-svs-disp:$ xdg-mime query filetype 1-single-celled_authorship-doc.doc 
application/msword

We could either:
a) Write a wrapper script that receives the file from sd-svs, looks at magic numbers and opens it with the correct application, or
b) See if xdg-mime supports using only magic numbers (however preliminary research came back empty so far)
c) Add extensions to submissions on the SecureDrop server code

@eloquence
Copy link
Member

See comment in #263 (comment) , is this moot as soon as we resolve freedomofpress/securedrop-client#163 ? If so that may be a better candidate for the next sprint.

@eloquence
Copy link
Member

(Per chat with @emkll closing for now in favor of freedomofpress/securedrop-client#163 ; we can revisit if that is insufficient.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants