Skip to content

Commit

Permalink
Issue #52 - Move secret_key_base to env var
Browse files Browse the repository at this point in the history
Pull the actual value out of the code and reference it from a
environment variable instead.
Use a new value since the public one was insecure.
Put the new value into an env var.
Add the encrypted env var to the travis file.
  • Loading branch information
kyletolle committed Aug 19, 2013
1 parent 814d758 commit 3036475
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
language: ruby
rvm:
- 2.0.0
- 2.0.0
before_script:
- psql -c 'create database tinder_test;' -U postgres
- rake db:migrate
- psql -c 'create database tinder_test;' -U postgres
- rake db:migrate
env:
matrix:
secure: XCqK+WRk7e3sFdR0g3ogCzSYY+Z4Xlmn2TZwAdHjUWbD1Zdfx6c1RmrbqgA9vvQhe31QxPE4zO0eqXVFhV7UpjxeZnt07tHIINh9bstbzKoSzy1dcDqSZTCqlGoNPemYcjpPl9S34ZHYrSP3qXRB4LLCPK8Kt9EtfEPahKg1JPs=
3 changes: 1 addition & 2 deletions config/initializers/secret_token.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
# 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.
Tinder::Application.config.secret_token = 'fe31f85b3ebe2a20f1408b9056dc566d53b7ba4db0f5e1957e2da85728c90b591762299bfbf6ee1ad4e1d404f6f5c02ea7fbee895a47f2d12c3151b65bd14829'
Tinder::Application.config.secret_key_base = 'fe31f85b3ebe2a20f1408b9056dc566d53b7ba4db0f5e1957e2da85728c90b591762299bfbf6ee1ad4e1d404f6f5c02ea7fbee895a47f2d12c3151b65bd14829'
Tinder::Application.config.secret_key_base = ENV['SECRET_KEY_BASE']

0 comments on commit 3036475

Please sign in to comment.