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

Further improve the way we handle too large archives #949

Merged
merged 4 commits into from Jul 9, 2019

Conversation

@libre-man
Copy link
Collaborator

commented Jul 4, 2019

Description

This makes sure the correct message is displayed when uploading archives with
more than the allowed number of files in them. It also further improves the
handling of zip files which will explode to too large sizes (zipbombs) as these
will no never be written to disk completely. Finally it also makes sure that any
left over temporary directories are removed when extracting fails for whatever
reason.

One possible improvement we could make is setting appropriate limits using setrlimit, however this is probably out of scope for this PR.

libre-man added 2 commits Jul 4, 2019
Further improve the way we handle too large archives
This makes sure the correct message is displayed when uploading archives with
more than the allowed number of files in them. It also further improves the
handling of zip files which will explode to too large sizes (zipbombs) as these
will no never be written to disk completely. Finally it also makes sure that any
left over temporary directories are removed when extracting fails for whatever
reason.
@codecov

This comment has been minimized.

Copy link

commented Jul 6, 2019

Codecov Report

Merging #949 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #949      +/-   ##
=========================================
+ Coverage   99.49%   99.5%   +<.01%     
=========================================
  Files          58      58              
  Lines        6376    6404      +28     
=========================================
+ Hits         6344    6372      +28     
  Misses         32      32
Impacted Files Coverage Δ
psef/exceptions.py 100% <100%> (ø) ⬆️
psef/files.py 100% <100%> (ø) ⬆️
psef/archive.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 870f4ec...f498e19. Read the comment docs.

libre-man and others added 2 commits Jul 9, 2019

@olmokramer olmokramer merged commit 952b3f0 into master Jul 9, 2019

6 of 7 checks passed

codeclimate 1 issue to fix
Details
codeclimate/diff-coverage 100% (50% threshold)
Details
codeclimate/total-coverage 26% (0.0% change)
Details
codecov/patch 100% of diff hit (target 99.49%)
Details
codecov/project 99.5% (+<.01%) compared to 870f4ec
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.002%) to 99.5%
Details

@olmokramer olmokramer deleted the feature/improve-too-large-archive-handling branch Jul 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.