Docs: origin guard, skip button, identity checks before spend, body cap, difficulty range
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
7bd26e9239
commit
8ce0e68fe2
1 changed files with 13 additions and 3 deletions
|
|
@ -50,12 +50,22 @@ time-lock:
|
|||
|
||||
- The challenge carries its issue time. A submission that says it waited is accepted only once `FallbackWaitSeconds`
|
||||
(default 30) have passed since issue; earlier, the page comes back saying how many seconds remain and the challenge is
|
||||
not spent (a fresh challenge would restart the clock). Every other failure re-renders with a fresh challenge, the
|
||||
consent box unchecked again and the identity kept. `FallbackWaitSeconds` is validated at 5 to under 300, since a challenge
|
||||
lives 300 seconds.
|
||||
not spent (a fresh challenge would restart the clock). The same holds for a refused identity (taken, reserved or
|
||||
malformed): those rules are checked before any permit or challenge is spent, and the still-valid challenge is kept. Every
|
||||
other failure re-renders with a fresh challenge, the consent box unchecked again (tick it again) and the identity kept.
|
||||
`FallbackWaitSeconds` is validated at 5 to under 300, since a challenge lives 300 seconds; `Captcha:Difficulty` at 1 to 24.
|
||||
- Fallback submissions have their own, stricter per-address budget (`Limits:FallbackPermits`, default 3 per
|
||||
`FallbackWindow`, default one hour; over it is 429 with Retry-After).
|
||||
- A submission names a nonce or says it waited, never both.
|
||||
- The page has a second submit button, always enabled, that abandons a solve in progress and submits on the time-lock, so
|
||||
a slow device is never stuck behind the proof of work.
|
||||
- `POST /auth/bifrost/register/form` refuses a request that did not come from the site itself (`RequestOriginGuard`: `Origin`
|
||||
equal to the site origin, else `Sec-Fetch-Site: same-origin`), 403, before it reads the body or spends anything, so a
|
||||
third-party page cannot register an account and replace a visitor's session. A request with neither header and no
|
||||
session cookie is allowed, because text browsers send neither and are the people the fallback is for. The body is capped
|
||||
at 16 KB (413) and the per-address budget is spent before it is read.
|
||||
- Whether a name is taken is answerable without a proof, bounded by the per-address budget. Names are public (they are
|
||||
chat localparts), so that leaks nothing.
|
||||
|
||||
Tradeoff, stated plainly. The time-lock is accessible to everyone who can use a browser: nothing to see, hear, read or
|
||||
solve, no script, no third party. It is also weaker than the proof of work. It costs an attacker wall-clock time, not CPU,
|
||||
|
|
|
|||
Loading…
Reference in a new issue