Skip to content

url: bounds-check short Windows file URL paths - #64788

Closed
Archkon wants to merge 1 commit into
nodejs:mainfrom
Archkon:url6
Closed

url: bounds-check short Windows file URL paths#64788
Archkon wants to merge 1 commit into
nodejs:mainfrom
Archkon:url6

Conversation

@Archkon

@Archkon Archkon commented Jul 27, 2026

Copy link
Copy Markdown

Check the decoded pathname length before reading the drive letter and colon. This prevents an out-of-bounds read for short URLs such as file:/// and reports ERR_INVALID_FILE_URL_PATH instead.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/url

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. whatwg-url Issues and PRs related to the WHATWG URL implementation. labels Jul 27, 2026
@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.14%. Comparing base (6a3d80f) to head (cf6d0d8).
⚠️ Report is 195 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64788      +/-   ##
==========================================
- Coverage   90.16%   90.14%   -0.03%     
==========================================
  Files         744      744              
  Lines      242518   242542      +24     
  Branches    45705    45692      -13     
==========================================
- Hits       218670   218637      -33     
- Misses      15357    15401      +44     
- Partials     8491     8504      +13     
Files with missing lines Coverage Δ
src/node_url.cc 79.01% <ø> (ø)

... and 36 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Check the decoded pathname length before reading the drive letter and
colon. This prevents an out-of-bounds read for short URLs such as
file:/// and reports ERR_INVALID_FILE_URL_PATH instead.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
@Archkon

This comment was marked as spam.

@avivkeller avivkeller added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Aug 5, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 5, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@Archkon

This comment was marked as spam.

@Archkon

This comment was marked as spam.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@Archkon

This comment was marked as spam.

avivkeller pushed a commit that referenced this pull request Aug 9, 2026
Check the decoded pathname length before reading the drive letter and
colon. This prevents an out-of-bounds read for short URLs such as
file:/// and reports ERR_INVALID_FILE_URL_PATH instead.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: #64788
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
@avivkeller

Copy link
Copy Markdown
Member

Landed in ee5a070

@avivkeller avivkeller closed this Aug 9, 2026
aduh95 pushed a commit that referenced this pull request Aug 13, 2026
Check the decoded pathname length before reading the drive letter and
colon. This prevents an out-of-bounds read for short URLs such as
file:/// and reports ERR_INVALID_FILE_URL_PATH instead.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: #64788
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. whatwg-url Issues and PRs related to the WHATWG URL implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants