Skip to content

fix: use HTTPS DATA_URL and safe tar extraction - #2725

Closed
chessing234 wants to merge 3 commits into
d2l-ai:masterfrom
chessing234:fix/2714-safe-tar-extract-https
Closed

chessing234 wants to merge 3 commits into
d2l-ai:masterfrom
chessing234:fix/2714-safe-tar-extract-https

Conversation

@chessing234

Copy link
Copy Markdown

Fixes #2714


  • Switch DATA_URL from HTTP to HTTPS across d2l/torch.py, d2l/mxnet.py, d2l/tensorflow.py, and d2l/jax.py
  • Add _safe_tar_extract() to reject path-traversal tar members (uses Python 3.12+ filter='data' when available)
  • Use context managers for archive handles in extract() and download_extract()

Test plan

  • Download and extract a sample dataset with each backend module
  • Confirm tar archives with ../ members are skipped on older Python versions

Made with Cursor

chessing234 and others added 3 commits June 24, 2026 21:14
Move "schon" after the object phrase in the introductory
translation example, matching natural German word order.

Fixes #2679

Co-authored-by: Cursor <cursoragent@cursor.com>
Switch dataset downloads to HTTPS and reject path-traversal tar members
when extracting archives across all d2l backend modules.

Fixes #2714

Co-authored-by: Cursor <cursoragent@cursor.com>
Switch dataset downloads to HTTPS and reject path-traversal tar members
when extracting archives across all d2l backend modules.

Fixes #2714

Co-authored-by: Cursor <cursoragent@cursor.com>
@chessing234

Copy link
Copy Markdown
Author

Closing as redundant: the HTTPS/safe-tar fix is covered by #2723, and the German word-order fix is covered by #2724. Please continue review on those focused PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tar-Slip Arbitrary File Write via HTTP Download in d2l

1 participant