1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Avoid Rack security warning no secret provided

This avoids "SECURITY WARNING: No secret option provided to Rack::Session::Cookie."
This commit is contained in:
Santiago Pastorino 2013-01-08 00:25:24 -02:00
parent fa3f51f734
commit cb3181e81e

View file

@ -21,6 +21,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