Skip to content

Tar pit#291

Merged
willmcgugan merged 10 commits intomasterfrom
tar-pit
Jun 8, 2019
Merged

Tar pit#291
willmcgugan merged 10 commits intomasterfrom
tar-pit

Conversation

@willmcgugan
Copy link
Member

@willmcgugan willmcgugan commented Jun 2, 2019

Type of changes

  • Bug fix
  • New feature
  • Documentation / docstrings
  • Tests
  • Other

Checklist

  • I've run the latest black with default args on new code.
  • I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
  • I've added tests for new code.
  • I accept that @willmcgugan may be pedantic in the code review.

Description

Fixes #284

Also dropped Python3.3 support to solve Github security warning. We support Python3.4 - Python3.7 and 3.8 is around the corner, so I think its time. Hope there is no pushback to that.

@coveralls
Copy link

coveralls commented Jun 2, 2019

Coverage Status

Coverage decreased (-0.04%) to 99.571% when pulling f848b39 on tar-pit into 4e6031f on master.

_name = normpath(name)
except IllegalBackReference:
# Back references outside root, must be up to no good.
pass
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than always silently ignoring back-reference errors, I wonder if it'd be worth ignoring them by default, with an FS init-option to re-throw the back-reference errors?

Copy link
Member Author

Choose a reason for hiding this comment

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

I pondered that, but if we raise an error at this point then a tar with a single badly formatted entry would prevent the tar from being opened. At least this way you could access any other valid entries via the TarFS.

I'm assuming that an invalid path here would be a fairly exotic thing, and there wouldn't be a great utility in reporting it back to the user. As far as I can tell, the tarfile module also silently ignores these errors, so that swayed me.

I'll wait until somebody asks for it or I can think of an argument against ignoring bad entries...

@willmcgugan willmcgugan merged commit ea33224 into master Jun 8, 2019
@willmcgugan willmcgugan deleted the tar-pit branch June 8, 2019 14:17
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.

another exception when a tarfile contains a path called '.'

3 participants