Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 24aca6b652
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const hostname = hostnameFromUrlInput(trimmed); | ||
| const scheme = isLocalHostname(hostname) ? "http://" : "https://"; | ||
| const candidate = trimmed.replace(/^\/\//, ""); | ||
| return new URL(`${scheme}${candidate}`).toString(); |
There was a problem hiding this comment.
Reject path-only values before normalizing remote URLs
normalizeRemoteUrlInput will silently reinterpret path-only input as a hostname because it prefixes a scheme without first requiring a host. For example, /login becomes https:///login, which URL canonicalizes to https://login/ instead of throwing. This is a regression from the previous strict parsing and can make init, analyze, and auth run against an unintended remote host when users provide a relative path or mistyped URL.
Useful? React with 👍 / 👎.
24aca6b to
5498cf3
Compare
Summary
Testing