aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-04-05 03:45:01 +1100
committerMatthew Landauer <matthew@openaustralia.org>2013-04-05 03:45:01 +1100
commitdf348ce77c51334e059f9ede70aca67524bdcbd5 (patch)
treee0c7a50adea91f6915c9710864dc14e456fcc95b
parentcc3da49bc927175a49d7150b98d762f65e143d21 (diff)
Invalidate cookies on upgrading from Rails 2 to Rails 3. Fixes #899
-rw-r--r--config/initializers/secret_token.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb
index f82348169..d120b94ae 100644
--- a/config/initializers/secret_token.rb
+++ b/config/initializers/secret_token.rb
@@ -4,4 +4,9 @@
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
-Alaveteli::Application.config.secret_token = AlaveteliConfiguration::cookie_store_session_secret
+
+# Just plopping an extra character on the secret_token so that any sessions on upgrading from
+# Rails 2 to Rails 3 version of Alaveteli are invalidated.
+# See http://blog.carbonfive.com/2011/03/19/rails-3-upgrade-tip-invalidate-session-cookies/
+
+Alaveteli::Application.config.secret_token = "3" + AlaveteliConfiguration::cookie_store_session_secret