Skip to content

fix(node): harden static file handler path resolution#15745

Merged
matthewp merged 1 commit intomainfrom
node-path-segments
Mar 4, 2026
Merged

fix(node): harden static file handler path resolution#15745
matthewp merged 1 commit intomainfrom
node-path-segments

Conversation

@matthewp
Copy link
Contributor

@matthewp matthewp commented Mar 4, 2026

Changes

  • Extracts path resolution logic in the node adapter static file handler into a resolveStaticPath function
  • Adds a bounds check to ensure resolved paths stay within the client directory before hitting the filesystem

Testing

Added unit tests in packages/integrations/node/test/units/serve-static-path-traversal.test.js

Docs

N/A, bug fix

@changeset-bot
Copy link

changeset-bot bot commented Mar 4, 2026

🦋 Changeset detected

Latest commit: c4b69d8

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: integration Related to any renderer integration (scope) label Mar 4, 2026
@matthewp matthewp marked this pull request as ready for review March 4, 2026 01:24
@matthewp matthewp merged commit 20b05c0 into main Mar 4, 2026
21 checks passed
@matthewp matthewp deleted the node-path-segments branch March 4, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: integration Related to any renderer integration (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants