| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Do not join cookies with new like if they weren't before
Add `Rack::Headers` wrapping to middleware to prevent header manipulation issues. Added a test to verify cookies remain as an array when flagged if already in array format.
There was a problem hiding this comment.
This PR fixes compatibility with Rack 3 by updating the handling of cookie headers, ensuring that cookies passed as either an array or a newline-delimited string are correctly processed.
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| spec/lib/secure_headers/middleware_spec.rb | Updates test cases for handling cookie header formats |
| lib/secure_headers/middleware.rb | Adjusts cookie processing logic for Rack 3 compatibility |
spec/lib/secure_headers/middleware_spec.rb:86
cookie_middleware = Middleware.new(lambda { |env| [200, env.merge("Set-Cookie" => "_session=foobar\n_guest=true"), "app"] })
Sorry, something went wrong.
There was a problem hiding this comment.
Thank you for the PR and apologies for the delay in getting this reviewed. We plan for this to be in the upcoming 7.2 release.
Sorry, something went wrong.
- #551 - #555 - #477 - #485 - #568 - #570 Fixes: #541 Fixes: #514 Fixes: #450 Fixes: #348 --------- Co-authored-by: Dmytro Bihniak <dmybih@attensi.com> Co-authored-by: Aaron Pfeifer <aaron.pfeifer@gmail.com> Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com> Co-authored-by: Dusty Greif <dgreif@users.noreply.github.com> Co-authored-by: Matt Langlois <fletchto99@github.com> Co-authored-by: Ryan Ahearn <ryan.ahearn@gsa.gov> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: fletchto99 <718681+fletchto99@users.noreply.github.com>m> Co-authored-by: fletchto99 <718681+fletchto99@users.noreply.github.com> Co-authored-by: Kylie Stradley <4666485+KyFaSt@users.noreply.github.com> Co-authored-by: Kylie Stradley <kyfast@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
All PRs:
fixes #514 by adding compatibility with Rack 3 which doesn't support muplitple headers joined with \n