Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Let GNU tar extract leading forwardslash members
Currently, we use tar -t to test if tar can untar a given tarball before we extract the tarball. This allows us to take advantage of tar's testing of malformed or malicious tarballs. GNU tar will remove leading forwardslashes in members if it finds any. This gets piped to stderr with a message. We check if any error exists and exit, despite the fact that in this case, GNU tar successfully extracted the tarball while dealing with a possible security issue. Hence in this change, we check to see if the error message is what we would expect if GNU tar encounters the leading forwardslash. If that is the error, we continue on. Resolves #684 Signed-off-by: Nisha K <[email protected]>
- Loading branch information