public
Description: Radiant is a no-fluff, open source content management system designed for small teams.
Home | Edit | New

No Secret Given to the protect from forgery call

Symptoms

When upgrading from pre-0.6.8, if you get this error on the login screen:

No :secret given to the #protect_from_forgery call.  Set that or use a session store capable of generating its own keys (Cookie Session Store).

The Solution

If you haven’t run rake production db:migrate, you’ll have to do so first. Open environment.rb and change:

config.action_controller.session_store = :active_record_store

to

config.action_controller.session_store = :cookie_store

When you get a CGI::Session::CookieStore::TamperedWithCookie error afterwards, simply clear your cookies and reload the page.

Last edited by johnmuhl, Thu Apr 09 13:11:03 -0700 2009
Home | Edit | New
Versions: