Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

join the remaining instead of reversing

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