diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2013-01-08 00:25:24 -0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2013-01-08 00:42:45 -0200 |
commit | d9a048001f869a3252cb85477f775de9860d615f (patch) | |
tree | b062376a91e01dbcc93de4b4c0dc319032a1cb94 /actionpack/lib/action_dispatch/middleware/session | |
parent | c75b5a88a82c79fdf95dfea4d72bf3c5a829930e (diff) | |
download | rails-d9a048001f869a3252cb85477f775de9860d615f.tar.gz rails-d9a048001f869a3252cb85477f775de9860d615f.tar.bz2 rails-d9a048001f869a3252cb85477f775de9860d615f.zip |
Avoid Rack security warning no secret provided
This avoids "SECURITY WARNING: No secret option provided to Rack::Session::Cookie."
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware/session')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/session/abstract_store.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb b/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb index c04fee21dc..cb6d98f09a 100644 --- a/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb +++ b/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb @@ -25,6 +25,8 @@ module ActionDispatch module Compatibility def initialize(app, options = {}) options[:key] ||= '_session_id' + # FIXME Rack's secret is not being used + options[:secret] ||= SecureRandom.hex(30) super end |