Files
pnpm/pnpm11/fetching/binary-fetcher
Zoltan Kochan dced54c4ba test(binary-fetcher): fix symlink assertions in TS CI (#14936)
The binary-fetcher symlink tests still named the removed adm-zip 0.6.0 patch and required its custom error message. Current adm-zip rejects those paths with a file-in-the-way error, so the tests failed despite preventing an outside-file overwrite. Check for that destination-path rejection and preserve the outside-file assertion, without coupling the tests to the removed patch's message.
2026-09-16 01:39:23 +02:00
..
2026-09-12 12:01:04 +02:00
…

@pnpm/fetching.binary-fetcher

A fetcher for binary archives

Installation

pnpm add @pnpm/fetching.binary-fetcher

Testing

Test Fixtures

The test/fixtures/ directory contains malicious ZIP files for testing path traversal protection:

File Entry Path Purpose
path-traversal.zip ../../../.npmrc Tests ../ escape sequences
absolute-path.zip /etc/passwd Tests absolute path entries
backslash-traversal.zip ..\..\..\evil.txt Tests Windows backslash traversal (Windows-only)

These fixtures are manually crafted because AdmZip's addFile() sanitizes paths automatically.

Note: The backslash test only runs on Windows because \ is a valid filename character on Unix.

Regenerating Fixtures

node --experimental-strip-types scripts/create-fixtures.ts

License

MIT