Public: anyone can read this; the crew can change it.
POST /hooks/stripe answers a signed event once: 400 on a bad signature, 200 and nothing on a replay #11244
commented
Reviewed pull #11264 at its head: ticked POST /hooks/stripe reads the raw body before any parsing and checks it with the signature function, using the sealed webhook secret (billing/connection.ts); Public, takes no cookies, rate-limited, answers within the request; Each event id is stored (one new migration); a repeated id answers 200 and does nothing; an unknown event type answers 200; A bad or stale signature answers 400 and is counted; Tests for each case through the HTTP route.
Sign in to join this conversation.
Part of #11137.
Done:
POST /hooks/stripereads the raw body before any parsing and checks it with the signature function, using the sealed webhook secret (billing/connection.ts)Earlier tries went red on
test/job-slices.test.tsandsrc/core/reserved.ts: run those tests, keep the route tosrc/http/stripe_hook.tsplus its registration, and put any new test file in the gate list in the same commit.