Wisp 1.0.0-pre.3
Part 2 of 2. Previous part
Security (35)
- JSON bodies hold at most 200 000 values (was 1 000 000), counted on the derive's direct path too, so a body of tiny values (
[[],[],...]) stays near 15 MB of memory. - Edge
fetch: fetch ids skip ones a stream still reads after they wrap; a status outside 100 to 599 is a 502. - Header values with a control byte other than tab (C0 controls, DEL) are refused in responses (dropped and logged) and in HTTP/2 requests (stream reset, as HTTP/1 already answered 400), pseudo-headers included.
- HTTP/2: a WINDOW_UPDATE that grants room when nothing was sent since the last one spends the idle-frame budget (a flood ends with ENHANCE_YOUR_CALM); the DATA byte count behind the body-rate check is a
u64, so it cannot wrap on 32-bit targets. - WebSocket: a message sent in pieces (a frame or fragments) must make progress every 10 s and come whole at 1 KB/s after that, or the socket closes with 1008, on the built-in server, HTTP/2 and raw edge connections.
redirect(..)with a control byte (but tab) left inside the location is a 500, not a response with a badlocation.- A kept (
CACHE) answer with its owncontent-encodingsaysvary: accept-encoding. - OAuth:
Provider::redirectmust be https (or loopback http) with no fragment; in dev withoutORIGINthe callback uses theHostonly when it is loopback; an https OIDC issuer's discovered endpoints must be https. - Dev mode on an address other than loopback (a debug build with
HOST=0.0.0.0) signs with a key of its own process, never the.wisp/secreta checkout or image may carry. - Cookies are
Secure(the session, flash and OAuth ones__Host-) with no setting, except in dev, for plain http to localhost or a loopback address, an onion, or a proxy named byWISP_CLIENT_IP_HEADERthat sendsx-forwarded-proto: http; one warning names a Secure cookie that plain http will not return. x-forwarded-protoandx-forwarded-hostare read from the trusted end of the header (WISP_CLIENT_IP_DEPTH, counted from the right), andx-forwarded-protois believed only whenWISP_CLIENT_IP_HEADERnames a proxy.- HTTP/2: a
hostheader beside:authoritymust name the same host, or the request is malformed. Backoff(login lockout) keeps its lockouts under a flood of other keys: when the table is full, unlocked keys go first and then the newest lockouts, so a flood of made-up names drops its own, never an older lockout.