From 019b570a70a147011af0dd4b93d3a7144d78993b Mon Sep 17 00:00:00 2001 From: KalabiYau Date: Sun, 27 Apr 2014 18:03:47 +0200 Subject: [PATCH] Remove insecure storage of cookies secret --- config/config.yml.example | 1 + config/initializers/secret_token.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/config.yml.example b/config/config.yml.example index 31ed06bc..f2e72703 100644 --- a/config/config.yml.example +++ b/config/config.yml.example @@ -12,6 +12,7 @@ defaults: &defaults # errbit configuration, get your own instance: https://github.com/errbit/errbit #errbit_key: 123456789101112131415 #errbit_host: errbit.exmaple.com + cookies_secret_token: 'secretstringwhichshouldbechanged' development: <<: *defaults diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb index 95330c8a..98825f4a 100644 --- a/config/initializers/secret_token.rb +++ b/config/initializers/secret_token.rb @@ -4,4 +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. -Osem::Application.config.secret_token = '49fe86302d3297fdccac1614834f3036841416b22d0ea0b04ae140ce512e1d736f4ef796b85097cce902760071838b10d1ac0e3cf02f55fd2d1031d4fce2f956' +Osem::Application.config.secret_token = CONFIG['cookies_secret_token']