Skip to content

Tar Supports Absolute Paths - Rust Tar Does Not #413

@anonhostpi

Description

@anonhostpi

This snippet should be configurable:

https://github.com/alexcrichton/tar-rs/blob/a1c3036af48fa02437909112239f0632e4cfcfae/src/header.rs#L1565-L1581

Tar supports absolute paths and is used by many build, install, and packaging systems to ensure patches to dependencies living at known file paths are applied when extracting. It's also often used for snapshotting portions of your file system as well.

GNU tar is quite explicit about this, but if I'm correct I believe all tar variants should have support for absolutes: https://www.gnu.org/software/tar/manual/html_node/absolute.html

GNU tar added the --absolute-names to make absolute path support explicit so that unintentional directory traversal could be blocked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions