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

Improve handling of temporary files #18

Open
fnoah opened this issue Jun 29, 2020 · 1 comment
Open

Improve handling of temporary files #18

fnoah opened this issue Jun 29, 2020 · 1 comment
Labels
enhancement New feature or request question Further information is requested

Comments

@fnoah
Copy link
Collaborator

fnoah commented Jun 29, 2020

There are some issues I found that occur when interacting with encrypted archives:

Currently, extracting an encrypted archive has the side effect that a .tar.lz file gets created in the source directory. This is less than ideal since someone could inadvertently compromise the security of the archive. The parameter extract_at_destination on the extract_archive function flips it around so that the .tar.lz gets created at the destination. This is used for integrity checks where the destination is a temporary directory.

Suggestion: it might make sense to automatically delete the .tar.lz after the decompression / extraction concluded since the file is only required for that one step.

Also, when creating an encrypted archive the unencrypted .tar.lz file won't get deleted. Again, this file is only needed until the encrypted file has been created and stored. There is a --remove option that will delete this file, but per default that won't happen.

Suggestion: remove .tar.lz per default and instead have an option to explicitly keep the unencrypted archive.

@izcram what do you think?

@fnoah fnoah added the question Further information is requested label Jun 29, 2020
@fnoah fnoah self-assigned this Jun 29, 2020
@fnoah fnoah added the enhancement New feature or request label Jun 29, 2020
@izcram izcram changed the title Improve handling of temporary .tar.lz files Improve handling of temporary files Jun 29, 2020
@izcram
Copy link
Member

izcram commented Jun 29, 2020

Good points! Generally, the user handling encryption and decryption should be take the necessary care to handle the data appropriately. In practice, these operations happen on a secure enough system, so this shouldn't be a problem. What could happen though, is that somebody copies the whole folder with both the encrypted and non-encrypted archive...
On the other hand, it is helpful to keep unencrypted archives to avoid repeated work if one wants to extract files in several steps.

Handling temporary files in general maybe needs some more thinking, I'll do that,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants