Skip to content

fix: preserve absolute Windows sendFile paths - #606

Merged
mcollina merged 1 commit into
mainfrom
fix/windows-sendfile-backslash-regression
Aug 6, 2026
Merged

fix: preserve absolute Windows sendFile paths#606
mcollina merged 1 commit into
mainfrom
fix/windows-sendfile-backslash-regression

Conversation

@mcollina

@mcollina mcollina commented Aug 6, 2026

Copy link
Copy Markdown
Member

Summary

Preserve legitimate absolute Windows filesystem paths passed to reply.sendFile() and reply.download() while retaining the backslash separator protection for URL pathnames.

The previous hardening rejected every pathname containing \, which caused absolute Windows paths such as path.join(...) to return 403.

Validation

  • node --test --test-name-pattern='serving disabled without root|does not serve static files with backslash separators|sendFile rejects non-canonical' test/static.test.js
  • npm run lint -- --no-warn-ignored

@mcollina
mcollina merged commit ec070cc into main Aug 6, 2026
30 of 31 checks passed
@mcollina
mcollina deleted the fix/windows-sendfile-backslash-regression branch August 6, 2026 12:34
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