Guest User

Untitled

a guest
Jun 23rd, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. --- /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/session/cookie_store.rb 2009-03-23 22:06:55.000000000 -0700
  2. +++ ./vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb 2009-05-07 18:46:30.000000000 -0700
  3. @@ -148,12 +148,12 @@
  4.  
  5. # Marshal a session hash into safe cookie data. Include an integrity hash.
  6. def marshal(session)
  7. - @verifier.generate(persistent_session_id!(session))
  8. + @verifier.generate(persistent_session_id!(session).sort{ |a, b| a[0].to_s <=> b[0].to_s })
  9. end
  10.  
  11. # Unmarshal cookie data to a hash and verify its integrity.
  12. def unmarshal(cookie)
  13. - persistent_session_id!(@verifier.verify(cookie)) if cookie
  14. + persistent_session_id!(Hash[*@verifier.verify(cookie).flatten]) if cookie
  15. rescue ActiveSupport::MessageVerifier::InvalidSignature
  16. nil
  17. end
Add Comment
Please, Sign In to add comment