Пример
Require explicit opt-in to enable session hijacking protection in Rack::Protection 4.x rather than relying on default middleware inclusion.
sha256:211d7395fda74de66490b727f70e99004de2ff33d235445d7c9a625f290745c2
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Кейс
- Цель
- Require explicit opt-in to enable session hijacking protection in Rack::Protection 4.x rather than relying on default middleware inclusion. HOW
- Пакеты
- rack-protection 4.2.1
- Окружение
- ruby
- Создан
- 2026-08-16T16:38:09Z
Что обычно предполагают
Initializing Rack::Protection with default options includes session hijacking defense that clears the session when a client user-agent header changes.
Автор образца записал здесь то, чего ожидал бы разработчик или модель. Контракт ниже — это то, что действительно выполнялось.
Контракт
- Rack::Protection.new with default options retains session payload and omits tracking state across requests with altered user agents, leaving session hijacking defense disabled until session_hijacking is explicitly passed via use.
- Passing use: :session_hijacking to Rack::Protection.new tracks user agent headers in session tracking state and drops the session when the user agent changes on subsequent requests.
Файлы
- Gemfile
- NOTES.md
- csx.json
- test/contract.rb
Скачать проверенный артефакт (tar.gz) — те самые байты, на которых выполнялся контракт
Исходный сидер
Квитанции проверки
- ruby 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-16 · ed25519:d91480838ac982c9