Skip to content

wrangler: reject cross-drive module paths#11888

Merged
petebacondarwin merged 1 commit intocloudflare:mainfrom
staticpayload:fix/wrangler-windows-module-paths
Mar 16, 2026
Merged

wrangler: reject cross-drive module paths#11888
petebacondarwin merged 1 commit intocloudflare:mainfrom
staticpayload:fix/wrangler-windows-module-paths

Conversation

@staticpayload
Copy link
Contributor

@staticpayload staticpayload commented Jan 13, 2026

Summary

  • handle Windows drive-letter module paths without mis-parsing the drive colon
  • reject cross-drive module paths that would bypass project-root validation
  • add win32-focused test coverage

Testing

  • pnpm -C /Users/staticpayload/workers-sdk -F @cloudflare/workers-utils build
  • pnpm -C /Users/staticpayload/workers-sdk -F wrangler test -- src/tests/pages/routes-module.test.ts
  • Tests
    • Tests included/updated
    • Tests not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: bug fix

Open with Devin

@staticpayload staticpayload requested review from a team as code owners January 13, 2026 12:13
@changeset-bot
Copy link

changeset-bot bot commented Jan 13, 2026

🦋 Changeset detected

Latest commit: b4e5830

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

@petebacondarwin petebacondarwin force-pushed the fix/wrangler-windows-module-paths branch from c0d338f to 7a58735 Compare March 14, 2026 16:40
@workers-devprod
Copy link
Contributor

workers-devprod commented Mar 14, 2026

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

@petebacondarwin petebacondarwin force-pushed the fix/wrangler-windows-module-paths branch from 7a58735 to b12a22e Compare March 16, 2026 13:58
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Mar 16, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 16, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@11888

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@11888

miniflare

npm i https://pkg.pr.new/miniflare@11888

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@11888

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@11888

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@11888

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@11888

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@11888

wrangler

npm i https://pkg.pr.new/wrangler@11888

commit: b4e5830

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@petebacondarwin petebacondarwin force-pushed the fix/wrangler-windows-module-paths branch from edba71e to b4e5830 Compare March 16, 2026 17:50
Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

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

Thanks @staticpayload for creating this PR.
I have made a number of fixups and I think it is now in a good place to land.

The main changes were to avoid hard coded regex for drive handling, and more comprehensive checking of the corner cases.

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Mar 16, 2026
@petebacondarwin petebacondarwin merged commit 0a7fef9 into cloudflare:main Mar 16, 2026
42 of 44 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants