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

Make it clearer how temp files are created during decryption #1228

Open
sssoleileraaa opened this issue Mar 17, 2021 · 0 comments
Open

Make it clearer how temp files are created during decryption #1228

sssoleileraaa opened this issue Mar 17, 2021 · 0 comments

Comments

@sssoleileraaa
Copy link
Contributor

TODO: Figure out a clearer way to safely copy to a temporary file that gets
deleted right away. We may need a safe_decrypt function in the future.

Address this TODO and match how safe_move and safe_copyfileobj use safe_mkdir to make sure any directories that are created during move or copy are created with the correct perms and within the expected base_path.

We might also want to entirely depend on the umask setting for this to simplify code. If we rely on umask then we can remove the code that creates each subdir individually in safe_mkdir as well. Or we can leave it for defence in depth.

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

1 participant