Permalink
Browse files

moving session secret out of git repo

  • Loading branch information...
1 parent 6b12584 commit 1967a7e5cb3307b3ece68699a69f3627d7643d91 @ryanb committed Sep 17, 2010
Showing with 6 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. +2 −0 config/deploy.rb
  3. +2 −2 config/initializers/session_store.rb
  4. +1 −0 config/session_secret.example.txt
View
@@ -4,3 +4,4 @@ tmp/**/*
database.yml
app_config.yml
public/assets
+config/session_secret.txt
View
@@ -28,6 +28,7 @@
task :symlink_extras do
run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml"
run "ln -nfs #{shared_path}/config/app_config.yml #{release_path}/config/app_config.yml"
+ run "ln -nfs #{shared_path}/config/session_secret.txt #{release_path}/config/session_secret.txt"
run "ln -nfs #{shared_path}/db/production.sqlite3 #{release_path}/db/production.sqlite3"
run "ln -nfs #{shared_path}/assets #{release_path}/public/assets"
end
@@ -40,6 +41,7 @@
run "mkdir #{shared_path}/db/sphinx"
put File.read("config/database.example.yml"), "#{shared_path}/config/database.yml"
put File.read("config/app_config.example.yml"), "#{shared_path}/config/app_config.yml"
+ put File.read("config/session_secret.example.txt"), "#{shared_path}/config/session_secret.txt"
puts "Now edit the config files and fill assets folder in #{shared_path}."
end
@@ -5,8 +5,8 @@
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
ActionController::Base.session = {
- :key => '_dailystamp_session',
- :secret => 'eb56cbf5d5e3b0d7c8de4271c428534b2dd3ce59f13488cb60abab274eee8b5be08eeae2d0aedbc40d4da3985f91c56a0a1651775c0a98aa75f3f9a239f66df4'
+ :key => '_dailystamp_session2',
+ :secret => File.read(Rails.root.join("config", "session_secret.txt")).strip
}
# Use the database for sessions instead of the cookie-based default,
@@ -0,0 +1 @@
+eb56cbf5d5e3b0d7c8de4271c428534b2dd3ce59f13488cb60abab274eee8b5be08eeae2d0aedbc40d4da3985f91c56a0a1651775c0a98aa75f3f9a239f66df4

0 comments on commit 1967a7e

Please sign in to comment.