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

file decryption and open #113

Merged
merged 7 commits into from
Nov 7, 2018
Merged

file decryption and open #113

merged 7 commits into from
Nov 7, 2018

Conversation

redshiftzero
Copy link
Contributor

Closes #20, closes #66

Supersedes #102 (brought @ntoll's work there where he added the file opening in this PR with some tiny changes from testing in my SD Qubes workstation)

This is to get us to a state where we can build the first round of securedrop-client package and integrate it into the workstation repo

Testing

On Qubes

  1. Single click a downloaded file should download, decrypt, and save
  2. Single click again once the button changes to "Open" should open the file using whatever default application for that mime type in a Disposable VM

On non-Qubes

  1. Make sure you added the test private key mentioned here to your GPG keyring
  2. To test the file opening part of this, you'll need to apply a diff like the following for mac (just swap out open for xdg-open on Linux):
diff --git a/securedrop_client/logic.py b/securedrop_client/logic.py
index 8b5c27c..99bbe4f 100644
@@ -462,6 +462,11 @@ class Client(QObject):
             process = QProcess(self)
             process.start(command, args)
         else:  # pragma: no cover
+            # Running on mac.
+            command = "open"
+            args = [submission_filepath]
+            process = QProcess(self)
+            process.start(command, args)
             # Non Qubes OS. Just log the event for now.
             logger.info('Opening file "{}".'.format(submission_filepath))

Then the behavior described for Qubes above should work as expected (except obviously no DispVM):

file-decrypt-open

@redshiftzero
Copy link
Contributor Author

redshiftzero commented Nov 6, 2018

hey @zenmonkeykstop if you have chance today please give this a spin in Qubes

Copy link
Contributor

@joshuathayer joshuathayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@redshiftzero and I talked face to face about this and found a few things to address, which she's going to make issues for / fix in this PR.

@joshuathayer
Copy link
Contributor

Also, ran this on my Qubes machine against @emkll 's SD server, and successfully downloaded and opened (in a disp VM) files.

@redshiftzero
Copy link
Contributor Author

Filed the following issues for followup here (and marked them with the help wanted tag if I think they would be good for hackathon participants): #117 #116 #115

Copy link
Contributor

@joshuathayer joshuathayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@redshiftzero
Copy link
Contributor Author

thanks for testing and reviewing @joshuathayer!

@redshiftzero redshiftzero merged commit 5fcf0cd into master Nov 7, 2018
@redshiftzero redshiftzero deleted the rest-of-mvp branch November 7, 2018 00:59
legoktm pushed a commit that referenced this pull request Dec 11, 2023
Update wheel checksums after rebuilding for Bookworm / 3.11
legoktm pushed a commit that referenced this pull request Dec 15, 2023
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

Successfully merging this pull request may close these issues.

Add support for decrypting downloaded documents Add support for viewing downloaded documents
3 participants