mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #94] [MERGED] fix: validate module paths during client-side navigation #305
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#305
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/94
Author: @southpolesteve
Created: 2/26/2026
Status: ✅ Merged
Merged: 2/26/2026
Merged by: @southpolesteve
Base:
main← Head:fix/validate-module-path📝 Commits (1)
834f3c8fix: validate module paths during client-side navigation📊 Changes
4 files changed (+107 additions, -18 deletions)
View changed files
📝
packages/vinext/src/client/entry.ts(+1 -12)➕
packages/vinext/src/client/validate-module-path.ts(+25 -0)📝
packages/vinext/src/shims/router.ts(+19 -6)📝
tests/shims.test.ts(+62 -0)📄 Description
Summary
Applies the existing
isValidModulePath()guard tonavigateClient()in the Pages Router client and fixes it to also reject protocol-relative paths.isValidModulePath()fromentry.tsinto a sharedvalidate-module-path.tsmodule//...) that the original inline version missedpageModuleUrlandappModuleUrlinnavigateClient()before callingimport(), falling back to full page navigation on invalid paths🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.