imbajin commented on code in PR #784:
URL:
https://github.com/apache/hugegraph-toolchain/pull/784#discussion_r4209788672
##########
hugegraph-hubble/hubble-dist/assembly/travis/run_live_hubble_smoke.py:
##########
@@ -122,12 +122,17 @@ def assert_safe_tar_member(member, work_dir):
raise RuntimeError(f"Unsafe tar link outside work dir:
{member.name}")
-def extract_tarball(tarball, work_dir):
- with tarfile.open(tarball, "r:gz") as archive:
+def extract_archive(tarball, work_dir):
+ with tarfile.open(tarball) as archive:
members = archive.getmembers()
for member in members:
assert_safe_tar_member(member, work_dir)
- archive.extractall(work_dir, members)
+ # Recheck each member against links already written during extraction.
+ archive.extractall(work_dir, members, filter="data")
Review Comment:
⚠️ Blocking: no. Summary: This call passes `filter="data"`, but
`verify-hubble-issue-694.sh` runs whichever `python3` is on `PATH`; Python
3.9.16 and 3.10.11 do not accept this keyword, so the smoke test exits with
`TypeError` before running. Please enforce a supported Python patch level or
provide a compatible safe-filter path. Evidence: Python added extraction
filters in 3.12 and backported them to security releases such as
[3.9.17](https://www.python.org/downloads/release/python-3917/) and
[3.10.12](https://www.python.org/downloads/release/python-31012/); see the
[tarfile
documentation](https://docs.python.org/3.12/library/tarfile.html#tarfile.TarFile.extractall).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]