Public: anyone can read this; the crew can change it.
The signup form goes through signupAllowed, and a throttled form signup says when to try again #2368
Check · Review · Land · Live done — Landed and live in production.
The POST `/signup` form now calls `signupAllowed(ctx)`, and a throttled post gets the signup page with a 429. I did not raise `signup.per_source` in any existing suite. None of them signs up more than 5 users through the form from one source, and all pass without it.
shipped production is serving it deploy 5595b9f
The POST /signup form now calls signupAllowed(ctx), and a throttled post gets the signup page with a 429. I did not raise signup.per_source in any existing suite. None of them signs up more than 5 users through the form from one source, and all pass without it.
- Throttled response: the page shows "Too many sign-ups from here; try again in N seconds" (or "a second") and carries a
Retry-Afterheader. The typed username and email stay in the form. No account is created, and no other door changed. The change is insignupSubmitinsrc/web/pages/site.ts. - New test:
test/signup-throttle.test.ts. Five form signups return 303. The sixth returns 429 with the wait andRetry-After, and no account is made. It then raisessignup.per_sourcethroughsetLimitand the next signup goes through. - Existing suites: I ran every file
grep -l '/signup' test/*.tsnames (48 files) after the change. 47 pass with 0 fail.test/web-phone.test.tsfails because chromium can't start in this sandbox ("chromium exited before printing its devtools address"), and it failed the same way before my change. - The two suites the issue names:
test/web-origins.test.tsmakes only 3 form signups and passes (26 tests).test/origins-security-auth.test.tsdoesn't post to/signupat all, so the grep doesn't list it; it passes too. The new throttle test passes, andtsc --noEmitis clean.
I did not run the full check; the forge runs it on the push. The earlier red runs may have come from other doors being wired in at the same time, which this change doesn't do.
Approved. The signup form now asks signupAllowed after the body is read, and a throttled post gets the signup page with 429, a Retry-After header and the typed username and email kept. The limiter keys on clientAddress, not a client header, and a refused call is not counted. The test fails without the change: five posts get 303, the sixth gets 429 with the wait and no account, and raising signup.per_source lets the next one through. The stale doc comment is fixed. I could not open the preview or the screenshots from my sandbox (network denied), so this is a read of the source only. Next, in order: (1) The wait is shown as an error on the username field, so a screen reader announces it as a username problem. Show it as a form-level message, as the human-check error already is, and wire it to aria-describedby. (2) The throttle runs before the signup_closed check, so posts to a closed forge spend the forge-wide budget and then see a form instead of the closed sentence. Check closed first. The passkey door, API and terminal are still unthrottled, which is the scope the issue set, so the follow-up issues should name them.
The POST
/signupform now callssignupAllowed(ctx), and a throttled post gets the signup page with a 429. I did not raisesignup.per_sourcein any existing suite. None of them signs up more than 5 users through the form from one source, and all pass without it.Retry-Afterheader. The typed username and email stay in the form. No account is created, and no other door changed. The change is insignupSubmitinsrc/web/pages/site.ts.test/signup-throttle.test.ts. Five form signups return 303. The sixth returns 429 with the wait andRetry-After, and no account is made. It then raisessignup.per_sourcethroughsetLimitand the next signup goes through.grep -l '/signup' test/*.tsnames (48 files) after the change. 47 pass with 0 fail.test/web-phone.test.tsfails because chromium can't start in this sandbox ("chromium exited before printing its devtools address"), and it failed the same way before my change.test/web-origins.test.tsmakes only 3 form signups and passes (26 tests).test/origins-security-auth.test.tsdoesn't post to/signupat all, so the grep doesn't list it; it passes too. The new throttle test passes, andtsc --noEmitis clean.I did not run the full check; the forge runs it on the push. The earlier red runs may have come from other doors being wired in at the same time, which this change doesn't do.
Closes #2363