7d2cd5a Improve robustness of dataset extraction by validating paths
📊 Changes
1 file changed (+14 additions, -1 deletions)
View changed files
📝tinytorch/milestones/data_manager.py (+14 -1)
📄 Description
Updated the dataset extraction logic in data_manager.py to include path validation. This ensures that when extracting the CIFAR-10 dataset, all members are strictly contained within the target directory, preventing potential file system issues or unintended overwrites. I noticed the current implementation uses extractall() directly, so adding this check makes the process much more robust for students working with the framework.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/harvard-edge/cs249r_book/pull/1182
**Author:** [@RinZ27](https://github.com/RinZ27)
**Created:** 2/19/2026
**Status:** ✅ Merged
**Merged:** 2/22/2026
**Merged by:** [@profvjreddi](https://github.com/profvjreddi)
**Base:** `dev` ← **Head:** `fix/safe-data-extraction`
---
### 📝 Commits (1)
- [`7d2cd5a`](https://github.com/harvard-edge/cs249r_book/commit/7d2cd5a47dca76d30345c72bb356f9fd1ca140e0) Improve robustness of dataset extraction by validating paths
### 📊 Changes
**1 file changed** (+14 additions, -1 deletions)
<details>
<summary>View changed files</summary>
📝 `tinytorch/milestones/data_manager.py` (+14 -1)
</details>
### 📄 Description
Updated the dataset extraction logic in `data_manager.py` to include path validation. This ensures that when extracting the CIFAR-10 dataset, all members are strictly contained within the target directory, preventing potential file system issues or unintended overwrites. I noticed the current implementation uses `extractall()` directly, so adding this check makes the process much more robust for students working with the framework.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/harvard-edge/cs249r_book/pull/1182
Author: @RinZ27
Created: 2/19/2026
Status: ✅ Merged
Merged: 2/22/2026
Merged by: @profvjreddi
Base:
dev← Head:fix/safe-data-extraction📝 Commits (1)
7d2cd5aImprove robustness of dataset extraction by validating paths📊 Changes
1 file changed (+14 additions, -1 deletions)
View changed files
📝
tinytorch/milestones/data_manager.py(+14 -1)📄 Description
Updated the dataset extraction logic in
data_manager.pyto include path validation. This ensures that when extracting the CIFAR-10 dataset, all members are strictly contained within the target directory, preventing potential file system issues or unintended overwrites. I noticed the current implementation usesextractall()directly, so adding this check makes the process much more robust for students working with the framework.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.