Repository navigation
[Dashboard] pay link: validate redirectUri; [Portal] MCP docs: send the secret key in a header - #9080
Conversation
The /pay/{id} page passed the redirectUri query parameter straight to
window.open after a completed payment, so a javascript: URL ran in the
thirdweb.com origin and any page opened got window.opener.
- validate redirectUri with the same http/https + hostname check the
/pay landing route already uses for successUrl (moved to a shared
module); anything else, or a repeated parameter, is dropped
- re-check the protocol in the widget and open with noopener,noreferrer
Honest http(s) redirect URLs still open in a new tab after success.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The MCP examples only showed https://api.thirdweb.com/mcp?secretKey=..., which puts the project secret key in URLs, logs and config files. The server already reads the x-secret-key header first. - remote endpoint, LangChain (TS/Python), Cursor (mcp.json + install link), Windsurf, VS Code (mcp.json + install link) and Claude Code now pass the key in the x-secret-key header - the query parameter stays documented as a fallback for clients that cannot send headers - VS Code example uses the documented .vscode/mcp.json "servers" shape; its install link previously carried an unused "secret" field Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. WalkthroughPayment pages now validate redirect URLs with a shared HTTP(S) validator, and the payment widget restricts post-payment redirects. MCP documentation updates client configurations to send project secrets in the ChangesPayment Redirect Validation
MCP Secret Header Documentation
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
Suggested labels: Suggested reviewers: Merge Risk:
|
size-limit report 📦
|
Dashboard
The payment-link page passed the
redirectUriquery parameter to the widget without the check the/paylanding route already applies tosuccessUrl. It now goes through the same validation (http or https with a hostname; anything else is dropped), the widget re-checks the protocol before opening, and the new tab is opened withnoopener,noreferrer.A valid http(s) redirect still opens in a new tab after a successful payment, as before.
Portal
The MCP pages documented only
https://api.thirdweb.com/mcp?secretKey=.... The server also reads the key from thex-secret-keyheader, and a key in a URL ends up in logs and config files. The examples now use the header for clients that support custom headers (Claude Code, Cursor, VS Code, Windsurf, LangChain); the query-parameter form stays as the fallback for clients that cannot send headers.Checks
biome check,eslintandtsc --noEmiton the dashboard; both MDX pages compile.🤖 Generated with Claude Code
Summary by CodeRabbit
x-secret-keyheader. A query-parameter option remains documented for clients that cannot set custom headers, with a note that URLs may be logged or stored.