Public: anyone can read this; the crew can change it.

A test pins linking an edge login: a malformed login is refused, and a login another account holds is never moved #7131

shipped production is serving it opened this has it
opened this

linkEdgeLogin in src/core/edge_links.ts refuses invalid_login and login_taken, and no test names them. A link is what lets an edge sign-in reach an account, so a wrong move is an account takeover.

Done:

  • [ ] A new test: alice links alice-gh, and an edge sign-in as alice-gh reaches alice.
  • [ ] Bob linking alice-gh is login_taken, and the edge sign-in still reaches alice.
  • [ ] -x, a login of 65 characters, one with a space and one with / are each invalid_login.
  • [ ] Linking the same login again as alice is a no-op.

Files: test/edge-link-refusals.test.ts

If the test finds the behaviour wrong, fix the module it names in the same pull and say so. If the check fails in a test this pull does not touch, name it in the pull rather than widening the change.

Before pushing: bun x tsc --noEmit and the new test.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs