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

Add symbolic link options #482

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

miurahr
Copy link
Owner

@miurahr miurahr commented Nov 1, 2022

  • Add enable_symlink boolean option for read, extractall, and extract
  • Add dereference boolean option for write and writeall
    • SevenZipFile constructor option dereference is marked deprecated and will be removed in future version

Signed-off-by: Hiroshi Miura [email protected]

- Add enable_symlink boolean option for read, extractall, and extract
  - Default to be True. It will be False in future.
- Add dereference boolean option for write and writeall
  - SevenZipFile constructor option dereference is marked deprecated
     and will be removed in future version

Signed-off-by: Hiroshi Miura <[email protected]>
@miurahr miurahr force-pushed the topic/miurahr/security/symlink-extraction-optional branch from 97b90c6 to b5edae5 Compare February 12, 2023 06:15
@miurahr miurahr marked this pull request as ready for review October 11, 2024 00:44
Copy link
Owner Author

@miurahr miurahr left a comment

Choose a reason for hiding this comment

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

We should treat an argument dereferece of SevenZipFile constructor as a default of write and writeall methods, and users can override it in each write call.

Use SevenZipFile argument dereference as default for extract methods
@miurahr
Copy link
Owner Author

miurahr commented Feb 25, 2025

#636 related

Copy link

codacy-production bot commented Feb 26, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.07% (target: -1.00%) 87.50%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (42a3dc8) 3514 3087 87.85%
Head commit (3023660) 3518 (+4) 3093 (+6) 87.92% (+0.07%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#482) 40 35 87.50%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@coveralls
Copy link

coveralls commented Feb 26, 2025

Coverage Status

coverage: 87.406% (+0.04%) from 87.365%
when pulling 3023660 on topic/miurahr/security/symlink-extraction-optional
into 42a3dc8 on master.

@miurahr
Copy link
Owner Author

miurahr commented Feb 27, 2025

This modification changes the behavior of py7zr. When got symbolic link inside archive, previous versions are extract it as symbolic link but now py7zr requires EXPLICIT option to extract symbolic link.

It is because, we need to update a manual document and put warning on README.
It is also better to make a discussion thread on GitHub discussion forum.

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.

2 participants