-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
zipfile: symlinks etc. #62795
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
Comments
The zipfile format (as described by .zip file format specification) allows for storing extra unix data, such as symlinks and device nodes in zipfile. Storing at least symlinks would be useful, and is supported by the infozip tools as well (the command-line zip and unzip commands on Linux systems). An implementation would use the "UNIX Extra Field (0x000d)" to store this information. |
Ronald, could you try to write a patch? |
My initial plan was to add the patch soon after filing the issue, but that's before I noticed that this needs some API design to integrate nicely :-) My current idea for the api:
This will also require some changes to the ZipInfo class. I'm not sure yet if adding support for device files and other unix attributes (UID/GID). |
And perhaps when trying to read a directory entry too.
What the tar module do?
Or rather as methods of the ZipInfo object. See TarInfo. |
about the readlink functionnality, I would like to point that it might lead to security issues see for example https://security.stackexchange.com/questions/73718/how-zip-symlink-works At least, the standard read should not do it by default. |
closing as a duplicate of #82102 |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: