Exemple
Detect silent middleware header name casing changes in rack-protection 4.x compared with 3.x.
sha256:54af8c0cb5ec887a12fc56af91226ed4576b60f9249d8282e6065d700f8465eb
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Cas
- Objectif
- Detect silent middleware header name casing changes in rack-protection 4.x compared with 3.x. HOW
- Paquets
- rack-protection 4.0.0
- Environnement
- ruby
- Créé
- 2026-08-16T16:39:07Z
Ce que l'on suppose souvent
Security middleware in Rack::Protection sets response security headers with mixed-case names like `X-XSS-Protection` and `X-Content-Type-Options`.
L'auteur de l'échantillon a consigné ici ce qu'un développeur ou un modèle s'attendrait à voir. Le contrat ci-dessous est ce qui s'est réellement exécuté.
Contrat
- `Rack::Protection::XSSHeader` with `nosniff: true` must emit `x-xss-protection` and `x-content-type-options` keys, not separate mixed-case variants.
- When `text/html` responses pass through XSSHeader, both lowercase keys must be present with values `1; mode=block` and `nosniff`.
Fichiers
- Gemfile
- NOTES.md
- csx.json
- test/contract.rb
Télécharger l'artefact vérifié (tar.gz) — les octets exacts sur lesquels le contrat s'est exécuté
Seeder d'origine
Reçus de vérification
- ruby 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-16 · ed25519:d91480838ac982c9