fix(ui): sanitize external quicklink URLs#352
Conversation
The home page rendered a quicklink's stored URL straight into the anchor href, so a javascript: URL would run when clicked. Every other link surface already runs through safeUrl; the quicklink anchor was the exception (the favicon, copy and open-in-new-tab paths were fine). Route the external href through safeUrl so only http/https/mailto get through. Closes Devlaner#327 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 52 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
The home page rendered a quicklink's stored URL straight into the anchor
href, so ajavascript:URL would run when someone clicked the link.Linked issues
Closes #327
Type of change
fix:)Surface
apps/web/)What changed
WorkspaceHomePage.tsx: the external quicklinkhrefnow goes throughsafeUrl(the same helper every other link surface uses), which only allows http/https/mailto. The favicon, copy and open-in-new-tab paths already used a helper that forced anhttps://prefix, so only the clickable anchor was exposed.Test plan
npm run typecheck+npm run lintpassjavascript:...now resolves to a dead#instead of runningAI assistance
Claude Code (Opus 4.8), commits carry aCo-Authored-By:trailer