New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tarfile.data_filter wrongly rejects some tarballs with symlinks #107845
Comments
Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Lumír 'Frenzy' Balhar <frenzy.madness@gmail.com>
…GH-107846) (cherry picked from commit acbd3f9) Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Lumír 'Frenzy' Balhar <frenzy.madness@gmail.com>
…GH-107846) (cherry picked from commit acbd3f9) Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Lumír 'Frenzy' Balhar <frenzy.madness@gmail.com>
…GH-107846) (cherry picked from commit acbd3f9) Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Lumír 'Frenzy' Balhar <frenzy.madness@gmail.com>
3.13 PR is merged. |
…ythonGH-107846) (pythonGH-108209) pythongh-107845: Fix symlink handling for tarfile.data_filter (pythonGH-107846) (cherry picked from commit acbd3f9) Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Lumír 'Frenzy' Balhar <frenzy.madness@gmail.com>
…ythonGH-107846) (pythonGH-108209) pythongh-107845: Fix symlink handling for tarfile.data_filter (pythonGH-107846) (cherry picked from commit acbd3f9) Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Lumír 'Frenzy' Balhar <frenzy.madness@gmail.com>
…ythonGH-107846) (pythonGH-108209) pythongh-107845: Fix symlink handling for tarfile.data_filter (pythonGH-107846) (cherry picked from commit acbd3f9) Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Lumír 'Frenzy' Balhar <frenzy.madness@gmail.com>
…ythonGH-107846) (pythonGH-108209) pythongh-107845: Fix symlink handling for tarfile.data_filter (pythonGH-107846) (cherry picked from commit acbd3f9) Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Lumír 'Frenzy' Balhar <frenzy.madness@gmail.com>
…ythonGH-107846) (python#108274) (cherry picked from commit acbd3f9) Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Lumír 'Frenzy' Balhar <frenzy.madness@gmail.com>
Ready to close this issue? |
Yes, thank you for the ping. sys.version_info[:3] in {(3, 8, 17), (3, 9, 17), (3, 10, 12), (3, 11, 4)} |
My implementation of PEP-706 has a bug: it wrongly determines the target of symlinks, and thus wrongly raises
LinkOutsideDestinationError
on some valid tarballs.I didn't pay enough attention to this quirk of the format (which I'd like to add to TarInfolinkname docs):
So, in a tarball that contains the following, the links point to
dir/target
:dir/target
other_dir/symlink
->../dir/target
other_dir/hardlink
->dir/target
But
data_filter
thinks thatother_dir/symlink
will point to../dir target
outside the destination directory.I have a fix but would like to test it more next week, before merging.
Sorry for the extra work this'll cause for a lot of people :(
Linked PRs
The text was updated successfully, but these errors were encountered: