Commit graph

2 commits

Author SHA1 Message Date
Mohammed Al Sahaf
7ce9f08237
cmd: normalize storage archive paths on Windows (#8410)
* Initial plan

* Normalize storage archive paths on export

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

---------

Co-authored-by: mohammed90 <2636183+mohammed90@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-11-14 11:45:12 -05:00
Matthew Holt
3fea1cc800 cmd: validate storage archive entries before import
Reject absolute, non-canonical, traversing or platform-unsafe keys and
non-regular entries (links, devices, FIFOs) before writing to storage,
so importing an untrusted archive cannot write outside the storage root.
Directory entries are skipped and a single leading "./" is removed, so
archives created with tar(1) from a storage directory still import.

Addresses scan report 89de9a51d786c23e.

Code written by GitHub Copilot (GPT-6.1 Sol, Claude Opus 5.5); reviewed by mholt.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-11 11:06:40 -07:00