diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-04-14 11:27:27 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-04-14 13:37:40 -0700 |
commit | 199c0bb338568c801792933594d618caf0cdcd4c (patch) | |
tree | 552c01333a20cde9310810af78e91f597863b510 | |
parent | 12ae92216bb17b6585f3ab4e9010bacd49a5ba9c (diff) | |
download | rails-199c0bb338568c801792933594d618caf0cdcd4c.tar.gz rails-199c0bb338568c801792933594d618caf0cdcd4c.tar.bz2 rails-199c0bb338568c801792933594d618caf0cdcd4c.zip |
generated session ids should be encoded as UTF-8
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/session/abstract_store.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb b/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb index 64d3a87fd0..1a811ce1b1 100644 --- a/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb +++ b/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb @@ -29,7 +29,9 @@ module ActionDispatch end def generate_sid - ActiveSupport::SecureRandom.hex(16) + sid = ActiveSupport::SecureRandom.hex(16) + sid.encode!('UTF-8') if sid.respond_to?(:encode!) + sid end protected |