diff --git a/winbuild/build_prepare.py b/winbuild/build_prepare.py index e702c7014d7..533d9d4771f 100644 --- a/winbuild/build_prepare.py +++ b/winbuild/build_prepare.py @@ -520,7 +520,10 @@ def extract_dep(url: str, filename: str, prefs: dict[str, str]) -> None: if sources_dir_abs != member_prefix: msg = "Attempted Path Traversal in Tar File" raise RuntimeError(msg) - tgz.extractall(sources_dir) + if sys.version_info <= (3, 11): + tgz.extractall(sources_dir) + else: + tgz.extractall(sources_dir, filter="data") else: msg = "Unknown archive type: " + filename raise RuntimeError(msg)