Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error 'SECURITY WARNING: No secret option provided to Rack::Session::Cookie' [duplicate]

Possible Duplicate:
No secret option provided to Rack::Session::Cookie warning?

While creating scaffolding, I got this error today:

SECURITY WARNING: No secret option provided to Rack::Session::Cookie. This poses a security threat. It is strongly recommended that you provide a secret to prevent exploits that may be possible from crafted cookies. This will not be supported in future versions of Rack, and future versions will even invalidate your existing user cookies.

But the key is set in config/initializers/secret_token.rb.

Am I supposed to do anything or is this just a standard warning which I can safely ignore since I already have the key?

like image 437
iCyborg Avatar asked Jan 07 '13 06:01

iCyborg


2 Answers

This is a known issue under discussion. It is due to the upgrade to Rack 1.4.2 and your choices. Until Rails is updated with a solution, your should ignore the error or downgrade to Rack 1.4.1, according to the people that know ;)

like image 117
Jonas Schubert Erlandsson Avatar answered Nov 19 '22 08:11

Jonas Schubert Erlandsson


According to the discussion in some other sites, this warning is popping up as Rails is using Rack cookies in a different way than intended. It should be ok to just ignore this warning for now until there is a final agreement on how to handle this issue and a fix in place.

like image 23
Sri Avatar answered Nov 19 '22 09:11

Sri