Skip to content

fix: reject non-url dist.tarball in libnpmpack and libnpmdiff - #10327

Open
rootvector2 wants to merge 1 commit into
npm:latestfrom
rootvector2:registry-tarball-url-check
Open

rootvector2 wants to merge 1 commit into
npm:latestfrom
rootvector2:registry-tarball-url-check

Conversation

@rootvector2

Copy link
Copy Markdown
Contributor

pack() in libnpmpack and tarball() in libnpmdiff pass a registry manifest's dist.tarball back to pacote.tarball() as a spec, so a file: or directory value from the registry picks the directory fetcher and runs that directory's prepare script during npm pack or npm diff, found by tracing manifest._resolved into pacote and confirmed with a mocked registry, fixed by requiring an http(s) url for registry specs before the fetch.

@rootvector2
rootvector2 requested a review from a team as a code owner November 21, 2026 06:31
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