We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b59eaaa commit fd5ba13Copy full SHA for fd5ba13
Lib/test/test_tarfile.py
@@ -3813,7 +3813,8 @@ def test_realpath_limit_attack(self):
3813
# this link will never be expanded by
3814
# os.path.realpath(strict=False), nor anything after it.
3815
linkpath = os.path.join(*steps, "l"*254)
3816
- arc.add(linkpath, symlink_to=os.path.join(*".." * len(steps)))
+ parent_segments = [".."] * len(steps)
3817
+ arc.add(linkpath, symlink_to=os.path.join(*parent_segments))
3818
# make a symlink outside to keep the tar command happy
3819
arc.add("escape", symlink_to=os.path.join(linkpath, ".."))
3820
# use the symlinks above, that are not checked, to create a hardlink
0 commit comments