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.
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-namesto make absolute path support explicit so that unintentional directory traversal could be blocked.