Skip to content

Fix for `opt_out_of_all_protection` regression

Compare
Choose a tag to compare
@oreoshake oreoshake released this 28 Mar 23:08
· 543 commits to main since this release

See #235

idempotent_additions? would return false when comparing OPT_OUT with OPT_OUT, causing header_hash_for to return a header cache with { nil => nil } which cause the middleware to blow up when { nil => nil } was merged into the rack header hash.

This is a regression in 3.1.0 only.

Now it returns true. I've added a test case to ensure that header_hash_for will never return such an element.