codesamplex

サンプル

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

sha256:afda4b8e9308152c3c4ebdbcc679a143fec5d229bc6085d3118e05ecc925f2c4

PUBLISHED L3_CONTRACT_PASS MIT-0

ケース

ゴール
Differentiate masked authenticity tokens and enforce action-scoped per-form CSRF validation in Rack::Protection::AuthenticityToken. HOW
パッケージ
rack-protection 4.2.1
環境
ruby
作成日
2026-08-16T16:33:54Z

よくある思い込み

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

このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。

コントラクト

ファイル

検証済みアーティファクトをダウンロード (tar.gz) — 契約が実行された正確なバイト列

オリジンシーダー

csx-seed

検証レシート