feat: add reserved username blocklist to block system routes and brand conflicts - #577
Conversation
## Summary Adds lib/reservedUsernames.ts with a curated blocklist of ~35 reserved handles and applies it at both the username check and user creation endpoints. ## Changes - lib/reservedUsernames.ts — Set of reserved words + isReservedUsername() helper - �pp/api/username/route.ts — check applied before DB lookup - �pp/api/register/route.ts (or equivalent) — second guard at creation time ## Why Without this, a user could claim linkid.qzz.io/api (Next.js route conflict), linkid.qzz.io/admin (phishing risk), or linkid.qzz.io/linkid (brand impersonation). ## Backward Compatibility Fully backward compatible — existing users are unaffected. Only new registrations are checked.
|
@divyanshim27 is attempting to deploy a commit to the vishnukothakapu's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Warning Review limit reached
Next review available in: 53 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: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Thanks for your contribution @divyanshim27 ! The preview deployment is currently failing, so I can't review the implementation yet. The build is failing with: in: It looks like a |
Closes #561
Summary
Adds
lib/reservedUsernames.tswith a curated blocklist of ~35 reserved handles and applies it at both the username check and user creation endpoints.Changes
lib/reservedUsernames.ts— Set of reserved words +isReservedUsername()helperapp/api/username/route.ts— check applied before DB lookupapp/api/register/route.ts(or equivalent) — second guard at creation timeWhy
Without this, a user could claim
linkid.qzz.io/api(Next.js route conflict),linkid.qzz.io/admin(phishing risk), orlinkid.qzz.io/linkid(brand impersonation).Backward Compatibility
Fully backward compatible — existing users are unaffected. Only new registrations are checked.