Skip to content

Put cb login activation code in the URL fragment - #195

Merged
sfc-gh-abrightwell merged 2 commits into
CrunchyData:mainfrom
wking-io:login-url-fragment-code
Sep 17, 2026
Merged

sfc-gh-abrightwell merged 2 commits into
CrunchyData:mainfrom
wking-io:login-url-fragment-code

Conversation

@wking-io

Copy link
Copy Markdown

Summary

  • cb login now opens /account/verify-cli/{id}#code={code} instead of ?code=.
  • Browser URL fragments are not sent to the server, so the activation code no longer appears in Heroku/CDN/proxy access logs (CWE-598).
  • The dashboard already reads location.hash (and still accepts query-string URLs until this ships). Specs assert the printed login URL uses #code= and not ?code=.

Test plan

  • Run crystal spec spec/cb/login_spec.cr
  • Run cb login, confirm the printed / opened URL uses #code=
  • Complete browser login and confirm credentials are stored as before
  • Confirm a copied #code= URL still activates on the dashboard verify-cli page

Made with Cursor

Keep the code out of the query string so it is not sent to the dashboard
server or written to access logs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@wking-io
wking-io requested a review from a team as a code owner September 16, 2026 18:48
Our specs checked the login URL we print, but not the one we hand to
the browser, which is the URL that has to carry the code in the
fragment. We now assert the full expected URL at both call sites.
@sfc-gh-abrightwell
sfc-gh-abrightwell merged commit 7966709 into CrunchyData:main Sep 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants