Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "join the remaining instead of reversing"

This reverts commit 9a4700f.
  • Loading branch information...
commit 734a00c5f4bb46e9a5e6e2677d89a2f285dcc185 1 parent 9a4700f
@spastorino spastorino authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/rack/session/cookie.rb
View
5 lib/rack/session/cookie.rb
@@ -135,8 +135,9 @@ def unpacked_cookie_data(env)
session_data = request.cookies[@key]
if @secrets.size > 0 && session_data
- *data, digest = session_data.split("--")
- session_data = data.join("--")
+ digest, session_data = session_data.reverse.split("--", 2)
+ digest.reverse! if digest
+ session_data.reverse! if session_data
session_data = nil unless digest_match?(session_data, digest)
end
Please sign in to comment.
Something went wrong with that request. Please try again.