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

Fix suffix check for archive extraction #66

Merged
merged 4 commits into from Sep 12, 2021

Conversation

aidy1991
Copy link
Contributor

Ref #65
Sorry, I noticed that implementation of #65 allows invalid file name like hoge.aazip because we check extension by backward matching and compared extension does not include ..

This PR will resolve this problem.

@github-actions
Copy link

Binder 👈 Launch a binder notebook on branch aidy1991/jupyter-archive/fix-suffix-check

@fcollonval
Copy link
Member

Thanks for testing that quickly. Could you also add test for this?

@aidy1991
Copy link
Contributor Author

Would it be better to add a new test case (test function) to test that it fails with a file name like archive.aazip?
Alternatively, we can use parameterize to add it to an existing test case, I think.

@fcollonval
Copy link
Member

I would add a new test_extract_archive_failure or something like that sounds better.

@aidy1991
Copy link
Contributor Author

Thank you for you advice! I'll try to add it.

Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

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

Thanks for adding the test. I left one suggestion and a question.

jupyter_archive/tests/test_archive_handler.py Outdated Show resolved Hide resolved
jupyter_archive/tests/test_archive_handler.py Outdated Show resolved Hide resolved
Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

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

Thanks a lot @aidy1991 to quickly react on the comments.

@fcollonval fcollonval merged commit 344100b into jupyterlab-contrib:master Sep 12, 2021
@aidy1991
Copy link
Contributor Author

Thank you for your review!!

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.

None yet

2 participants