codesamplex

Sample

Differentiate masked authenticity tokens and enforce action-scoped per-form CSRF validation in Rack::Protection::AuthenticityToken.

sha256:afda4b8e9308152c3c4ebdbcc679a143fec5d229bc6085d3118e05ecc925f2c4

PUBLISHED L3_CONTRACT_PASS MIT-0

Case

Goal
Differentiate masked authenticity tokens and enforce action-scoped per-form CSRF validation in Rack::Protection::AuthenticityToken. HOW
Packages
rack-protection 4.2.1
Environment
ruby
Created
2026-08-16T16:33:54Z

Commonly assumed

Rack::Protection::AuthenticityToken.token returns a static raw session token, and any token generated for a session validates any state-changing POST endpoint.

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