Skip to content

Sanitizing of zip slip paths is overly aggressive - #176

Open
sftse wants to merge 3 commits into
bearcove:mainfrom
sftse:sanitize-name
Open

sftse wants to merge 3 commits into
bearcove:mainfrom
sftse:sanitize-name

Conversation

@sftse

@sftse sftse commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

The sanitize_name method is a overly aggressive and will also filter file names that contain multiple dots.

The simplest way to be sure there are no .. components would be to use Path::components() but since previous requests want no_std #98 we've hand-rolled a slightly tighter detection of zip slip paths.

@sftse sftse changed the title Sanitize name Sanitizing of zip slip paths is overly aggressive Nov 12, 2026
@codecov

codecov Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.02%. Comparing base (15fb2e3) to head (47ff274).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #176      +/-   ##
==========================================
+ Coverage   77.89%   78.02%   +0.13%     
==========================================
  Files          27       27              
  Lines        2714     2708       -6     
  Branches      134      132       -2     
==========================================
- Hits         2114     2113       -1     
+ Misses        531      528       -3     
+ Partials       69       67       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant