catcrafts.net/tests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jorijn van der Graaf 21d34b13ed
http: bodies end at 64 KiB, and the checkout limit counts per IPv6 /48
Two limits that were not limiting.

The listener's default body limit is 512 MiB and nothing set another,
with no cap on connections: one 64 MiB POST took the server from 7 MB
to 72 MB before the handler's own 16 KiB check answered 413. The limit
is now 64 KiB. A request that announces more in Content-Length is
answered 400 from its headers, with none of its body read: a 64 MiB
upload is refused after 786 KB and the server's peak memory does not
move.

That is a limit on the decoded body, and the comment says so. A chunked
request sent straight to the port can pad its chunk framing and still
make one connection hold hundreds of megabytes; the parser that allows
it is Crafter.Network's. Behind Caddy an oversized body is refused by
request_body before it gets here, so this is one more thing that rests
on port 8081 being private.

The per-peer checkout limit was kept per address. Over IPv6 one
subscriber holds a whole prefix, a /56 or a /48, and can submit from a
fresh address every time, so the per-peer cap did nothing and the
global cap was the only limit an IPv6 client met. The key is now the
IPv4 address or the IPv6 /48 (RateLimitKeyFor). An IPv4-mapped address
is keyed as the IPv4 client it is, and something that does not read as
an address is keyed as written, so a peer is never dropped to "no peer"
by its spelling. On a /56 ISP 256 neighbouring households share one
budget of six submissions per ten minutes; that was weighed and taken.

ShouldGuardRequestProvenance pins the key. ShouldServeRoutes drives it
over HTTP: six addresses of one /48 are accepted, a seventh is refused
with 429, the next /48 is not; and a body past 64 KiB is refused with
the server still up afterwards.

Found in the security review of 2026-11-26.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
2026-11-26 11:05:35 +01:00
..
harness bank: Nostro reads the bank's callback, and the shop's bunq code is gone 2026-11-25 15:08:42 +01:00
ShouldBootWasmAtDepth tests and eurc 2026-08-15 00:54:05 +02:00
ShouldBuildInvoices checkout: an address field is one line, and the invoice prints it as text 2026-11-26 11:05:35 +01:00
ShouldBuildMediaLadders tests and eurc 2026-08-15 00:54:05 +02:00
ShouldComputeMoney markdown fix 2026-08-18 11:12:24 +02:00
ShouldEmitStructuredData removed fp6 from shop 2026-09-05 18:38:39 +02:00
ShouldEscapeHtml bank: the order page offers a payto link and quotes one reference 2026-11-25 15:33:50 +01:00
ShouldFoldTheOrderLedger donation item, shop soft open 2026-08-17 11:04:03 +02:00
ShouldGuardRequestProvenance http: bodies end at 64 KiB, and the checkout limit counts per IPv6 /48 2026-11-26 11:05:35 +01:00
ShouldIssueEurcAddresses donation item, shop soft open 2026-08-17 11:04:03 +02:00
ShouldMatchBankTransfers bank: Nostro reads the bank's callback, and the shop's bunq code is gone 2026-11-25 15:08:42 +01:00
ShouldMintOrderTokens Replaced mollie 2026-08-20 20:15:47 +02:00
ShouldParseEurcChains payment tests 2026-08-20 01:36:42 +02:00
ShouldParseJson tests and eurc 2026-08-15 00:54:05 +02:00
ShouldParseSendcloudRates tests and eurc 2026-08-15 00:54:05 +02:00
ShouldProcessCheckout removed fp6 from shop 2026-09-05 18:38:39 +02:00
ShouldPublishFinancials retire the bunq integration 2026-08-17 11:43:09 +02:00
ShouldReadBankCallbacks bank: Nostro reads the bank's callback, and the shop's bunq code is gone 2026-11-25 15:08:42 +01:00
ShouldReceiveBankCallbacks bank: Nostro reads the bank's callback, and the shop's bunq code is gone 2026-11-25 15:08:42 +01:00
ShouldRenderMarkdown markdown fix 2026-08-18 11:12:24 +02:00
ShouldSellTheShopFront removed fp6 from shop 2026-09-05 18:38:39 +02:00
ShouldServeFinancialsLive retire the bunq integration 2026-08-17 11:43:09 +02:00
ShouldServePostPages tests and eurc 2026-08-15 00:54:05 +02:00
ShouldServePosts tests and eurc 2026-08-15 00:54:05 +02:00
ShouldServeRoutes http: bodies end at 64 KiB, and the checkout limit counts per IPv6 /48 2026-11-26 11:05:35 +01:00
ShouldSettleBankTransfers bank: the order page offers a payto link and quotes one reference 2026-11-25 15:33:50 +01:00
ShouldSettleEurcOnTestnet crypto test fix 2026-08-20 01:49:15 +02:00
ShouldShipContent removed fp6 from shop 2026-09-05 18:38:39 +02:00
ShouldStayScriptFree removed fp6 from shop 2026-09-05 18:38:39 +02:00
ShouldValidateForms checkout: an address field is one line, and the invoice prints it as text 2026-11-26 11:05:35 +01:00