Permalink
Browse files

Strip newlines from cookie session data

  • Loading branch information...
1 parent 69e9cbb commit 29a06f10e8600bbda333c30bf294e7896f35b8d5 @jeremy jeremy committed Aug 6, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_controller/session/cookie_store.rb
@@ -129,7 +129,7 @@ def generate_digest(data)
private
# Marshal a session hash into safe cookie data. Include an integrity hash.
def marshal(session)
- data = ActiveSupport::Base64.encode64(Marshal.dump(session)).chop
+ data = ActiveSupport::Base64.encode64s(Marshal.dump(session))
"#{data}--#{generate_digest(data)}"
end

0 comments on commit 29a06f1

Please sign in to comment.