Port of #3357: Fix/insecure tempfile#3360
Merged
dmitryduev merged 3 commits intomasterfrom Mar 10, 2022
Merged
Conversation
Collaborator
|
yeah that should also work... the official documentation (usage example): you could still use the |
Collaborator
but you solution also great so approving |
kptkin
approved these changes
Mar 10, 2022
Codecov Report
@@ Coverage Diff @@
## master #3360 +/- ##
==========================================
+ Coverage 81.33% 81.44% +0.10%
==========================================
Files 232 233 +1
Lines 28320 28545 +225
==========================================
+ Hits 23035 23248 +213
- Misses 5285 5297 +12
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Description
I pulled in #3357 and made a modification to the proposed solution that ensures that the created tempfile descriptor is closed before unlinking.
Testing
tests/test_util.py::test_make_tarfilepasses.