"safe links" behavior can be circumvented by bad files #20
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: stephenseo/SimpleArchiver#20
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
If a symlink exists in an archive that doesn't point to anything in the archive, and the bit marking it as invalid is not set, it may still be created on extraction. To fix this, a check will be needed to avoid creating such a link unless if "--no-safe-links" is specified.
Due to both version 0 and 1 of the file format, all files will need to be extracted first before checking if the link actually points to one of them. This means that the workflow for checking this probably will be as follows: extract everything while keeping track of filenames, check every created symlink if it points to the previously extracted files (and proper symlink to symlink handling), and removal of bad symlinks.
This has to be done this way because seeking the input file will break compatibility with piped in archives, and the only way to check against all files in the archive is to extract them first. In other words, seeking is not allowed and has to be done in a single pass through the input file and extraction must take place to get every filename.