Skip to content

test: fix path traversal tests after supertest v7.x upgrade#138

Open
Tony133 wants to merge 1 commit into
mainfrom
fix/supertest-v7-tests
Open

test: fix path traversal tests after supertest v7.x upgrade#138
Tony133 wants to merge 1 commit into
mainfrom
fix/supertest-v7-tests

Conversation

@Tony133

@Tony133 Tony133 commented Jul 14, 2026

Copy link
Copy Markdown
Member

Proposal:

  • Fixes path traversal tests in test/send.1.test.js to unblock upgrading to supertest@7.0.0. Supertest v7 strictly adheres to the WHATWG URL standard. It now automatically normalizes URL paths on the client-side before sending the request.
    As a result, a path like /pets/%2e%2e/%2e%2e/send.js gets resolved to /send.js before hitting the network. The server never receives the traversal payload, resulting in a 404 Not Found instead of the expected 403 Forbidden.

Note:

@Tony133 Tony133 marked this pull request as ready for review July 14, 2026 10:51
@Tony133 Tony133 requested a review from a team July 14, 2026 10:51

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

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.

2 participants