Skip to content

fix: validate paths in fromEntries and Installer version args#193

Merged
MarshallOfSound merged 2 commits intomainfrom
sam/from-entries-path-check
Apr 4, 2026
Merged

fix: validate paths in fromEntries and Installer version args#193
MarshallOfSound merged 2 commits intomainfrom
sam/from-entries-path-check

Conversation

@MarshallOfSound
Copy link
Copy Markdown
Member

@MarshallOfSound MarshallOfSound commented Apr 4, 2026

FiddleFactory#fromEntries joined the provided filename directly onto the cache folder, so entries like ../../foo would land outside the fiddle's directory. This resolves each target path and throws if it isn't contained within the fiddle folder.

Installer#remove and Installer#ensureDownloaded joined the version argument onto the downloads folder without validating it. These now throw if version isn't valid semver.

Added tests for each.

@MarshallOfSound MarshallOfSound requested a review from a team as a code owner April 4, 2026 23:47
@MarshallOfSound MarshallOfSound changed the title fix: reject fromEntries filenames that resolve outside the fiddle dir fix: validate paths in fromEntries and Installer version args Apr 4, 2026
@MarshallOfSound MarshallOfSound merged commit 7f7f47f into main Apr 4, 2026
10 checks passed
@MarshallOfSound MarshallOfSound deleted the sam/from-entries-path-check branch April 4, 2026 23:55
@electron-npm-package-publisher
Copy link
Copy Markdown

🎉 This PR is included in version 2.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants