add unlink-before-extract behavior for tarfile
authorPhilipp Gesang <philipp.gesang@intra2net.com>
Fri, 28 Oct 2016 15:02:31 +0000 (17:02 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Tue, 4 Feb 2020 13:08:27 +0000 (14:08 +0100)
commitc650acfaa0062530ed59219d5babba40021d3bdf
treea2148e8327239940ff2e7b6c472d21c9d5f37e4d
parent67469d94e838cb8b5c9b6da55cd468fc33f45c8a
add unlink-before-extract behavior for tarfile

Implement optional removal of existing files analogous to the -U
option of GNU tar and bsdtar. This is an effective measure
against symlink attacks which tarfile.py is not capable of
mitigating.

Signed-off-by: Philipp Gesang <philipp.gesang@intra2net.com>
deltatar/deltatar.py
deltatar/tarfile.py