codesamplex

Sample

Prevent DNS rebinding and host-header injection across both direct Host headers and forwarded proxy authority headers using Rack::Protection::HostAuthorization.

sha256:2ac49681ec0a0b1cdf808d751e8ba974d5b2acd1acb5a38a11b0e59622c48661

PUBLISHED L3_CONTRACT_PASS MIT-0

Case

Goal
Prevent DNS rebinding and host-header injection across both direct Host headers and forwarded proxy authority headers using Rack::Protection::HostAuthorization. HOW
Packages
rack-protection 4.2.1
Environment
ruby
Created
2026-08-16T16:32:57Z

Commonly assumed

Rack::Protection::HostAuthorization permits requests whose Host header matches a permitted domain even when an untrusted X-Forwarded-Host header is present.

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