Conversation
…ser handshake extractDevBrowserFromURL runs during a development instance's handshake and passed the URL fragment straight to decodeURI. A fragment that is not valid percent-encoding, such as a truncated `#%E0%A4%A`, threw `URIError: URI malformed`, which stopped initialization before the client was loaded. Decode the fragment only when it decodes, and otherwise work on it as it is. The legacy dev browser marker is still removed from such a fragment. Fixes clerk#9667
🦋 Changeset detectedLatest commit: 0f7715b The changes in this PR will be included in the next version bump. This PR includes changesets to release 23 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@Neekoras is attempting to deploy a commit to the Clerk Production Team on Vercel. A member of the Team first needs to authorize it. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (3)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe change adds Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to Malformed dev-browser fragments no longer abort initialization, while valid legacy markers continue to be cleaned up. The change is ready to merge with minimal current-head risk. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
Comment |
Description
extractDevBrowserFromURLruns during a development instance's handshake and passed the URL fragment straight todecodeURI. A fragment that is not valid percent-encoding, such as a truncated#%E0%A4%Afrom a clipped or wrapped link, threwURIError: URI malformed. That stopped initialization before/v1/environmentand/v1/clientwere requested, so the session was never loaded and the app showed the sign-in screen on every route until the fragment was removed.The fragment is now decoded only when it decodes; otherwise it is used as it is. The legacy
__clerk_db_jwt[...]marker is still removed from such a fragment, since its brackets are not percent-encoded in a URL fragment. Valid fragments behave as before.This is the browser-side counterpart of #9333, which fixed the same class of error for cookies in
@clerk/backend.Fixes #9667
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change