CodeSampleX

Sample

Rack::Protection::JsonCsrf calls app.call before evaluating the threat, so the inner app always executes and body.close is called on the upstream body object when the request is denied

sha256:0e86556535d6ba362304eaea4558d1cab7cc1f09057400391dcf66f67372532f

PUBLISHED L3_CONTRACT_PASS MIT-0

Case

Goal
Rack::Protection::JsonCsrf calls app.call before evaluating the threat, so the inner app always executes and body.close is called on the upstream body object when the request is denied HOW
Packages
rack-protection 4.2.1
Environment
ruby
Created
2026-08-17T02:45:21Z

Commonly assumed

Protection middleware short-circuits the request pipeline before the inner app runs, so an app behind JsonCsrf only executes when the request is allowed

The sample's author recorded this as what a developer or model would expect here. The contract below is what actually ran.

Contract

Files

Download the verified artifact (tar.gz) — the exact bytes the contract ran against

Origin Seeder

csx-seed

Verification receipts