Skip to content

fix: keep the project folder inside the current directory - #102

Merged
msmps merged 1 commit into
mainfrom
fix/project-path-safety
Oct 31, 2026
Merged

msmps merged 1 commit into
mainfrom
fix/project-path-safety

Conversation

@msmps

@msmps msmps commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

validateProjectName accepted '/', absolute paths and 'foo/../..' because a
name with slashes that did not match the scoped-package pattern skipped the
URL-friendly check. Combined with the 'directory exists, delete it?' prompt,
one confirmation could recursively delete a folder outside the working
directory.

Reject such names (and '@scope/..'), and resolve the project path through
resolveProjectPath, which refuses anything that is not a new folder strictly
inside the current directory.


Stack

Merge bottom-up into main: merge #100 first, then each PR above it (GitHub retargets the next one to main).

validateProjectName accepted '/', absolute paths and 'foo/../..' because a
name with slashes that did not match the scoped-package pattern skipped the
URL-friendly check. Combined with the 'directory exists, delete it?' prompt,
one confirmation could recursively delete a folder outside the working
directory.

Reject such names (and '@scope/..'), and resolve the project path through
resolveProjectPath, which refuses anything that is not a new folder strictly
inside the current directory.
@msmps
msmps force-pushed the fix/project-path-safety branch from e7867b7 to 66ce892 Compare October 31, 2026 21:31
@msmps
msmps merged commit f5aa3b1 into main Oct 31, 2026
@msmps
msmps deleted the fix/project-path-safety branch October 31, 2026 21:32
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