fix: use normalized, URL-encoded ENS name for avatar proxy URL#680
Conversation
Build the avatar proxy URL from the normalized name and URL-encode the segment, so Unicode/emoji names are valid in the path and the image route's name-based blacklist operates on the canonical form. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-Authored-By: Copilot <copilot@github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Your plan includes 1 review of capacity. Refill in 31 minutes and 41 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro 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 |
There was a problem hiding this comment.
Pull request overview
This PR updates ENS avatar proxy URL construction to use the ENS normalized name and to URL-encode it when embedding it in the /api/ens-data/image/[name] path segment, preventing invalid raw-Unicode paths for emoji/Unicode ENS names and aligning with the API route’s pre-normalization blacklist check behavior.
Changes:
- Build the avatar proxy URL from
normalizedNameinstead ofname. - Apply
encodeURIComponentto the ENS name used in the avatar proxy URL path segment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Follow-up to #679.
Change
Build the avatar proxy URL from the normalized name and
encodeURIComponentthe path segment:Why
transcode.ethare unaffected (no-op).pages/api/ens-data/image/[name].tsx) checks its blacklist on the raw param before normalizing, so feeding it the canonical form keeps that filter consistent. The route re-normalizes, so this is idempotent.Addresses a Copilot review comment on #679.