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

Repeated wrong passwords for one username are slowed or refused with a 429 and Retry-After: twelve in a row answer 422 each on production #14373

shipped production is serving it opened this has it

Landed in pull #14384 · run

opened this

Seen on production today: twelve consecutive POST /signin with the same username and a wrong password (same-origin header set) each answered 422 That username and password… with no 429, no Retry-After and no slower answer. The OpenAPI description promises every 429 carries Retry-After, so a limiter exists somewhere; it does not guard this door at this count.

First, check main: read how /signin, /api/v1/start and token sign-in are rationed (src/security.ts, the rate limiter). If sign-in already has a limit that the tunnel's shared address hides, say so in the pull and prove it with a test that sets the client address.

Done when

Files: src/security.ts (or the sign-in handler's limiter), the sign-in route in src/http/, test/ Risks: locking a real owner out: the lock is per username and short; an admin's token door is untouched. Brief: torque.

commented

Reviewed pull #14384 at its head: ticked Failed sign-ins are counted per username and per client address; past a small number (say 8 in 10 minutes) the answer is 429 with an integer Retry-After and the same words on the page, for a right password too until the window passes; The window and count are named constants with their reason beside them; a success clears the username's count; The answer for an unknown username and a wrong password stays the same words and timing class (no user enumeration); A test signs in wrong past the limit and sees 429, then a different username succeeds; it fails on today's main.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs