signup steps: journey() conflates page identity with query status #123
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-web#123
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "%!s()"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
journey()takes a single string that means two different things, and the two can contradict each other.src/lib/signup-steps.tsderives step state from the sign-up page's?status=query parameter. But/welcomeis not a status — it is a page — and it was threaded through the same argument:So the parameter is now "status, or sometimes a page name". Visiting
/signup?status=welcomeby hand renders "steps 1-3 done, step 4 current" above a complete, empty sign-up form — a state that cannot be reached legitimately and makes no sense.Why it is minor
Only reachable by editing the URL. Nothing is disclosed, nothing breaks, and
journey()is total over any string so it cannot throw. Cosmetic incoherence.Why it is worth fixing anyway
The conflation will spread. The next surface that needs a step state (a payment step, an admin view) faces the same choice, and the honest answer keeps being "invent another pseudo-status". A clearer seam:
The page says where the user is; the status says what happened there.
/signup?status=welcomethen renders step 1 current, as it should, because the page issignupregardless of the query string.That is a small refactor with a mechanical test update — the existing tests already cover every status, so they would gain a page argument and one new case asserting that an unexpected status on the sign-up page cannot fake progress.
Done when
A query parameter cannot make the sign-up page claim the journey is nearly complete.
Already done — shipped by
8439fa4(PR #125); its close keywords never fired.Verified at `src/lib/signup-steps.ts:52`: the signature is now `journey({ page, status })`, with
page identity separated from query status and the attacker-controlled `status` documented as such.
A regression test covers it at `src/lib/signup-steps.test.ts:18-37`.
Closing as already implemented.