From b3411ff59eb1e1c31f98f58f117a2ffaaf0c3ff5 Mon Sep 17 00:00:00 2001 From: "Hongli Lai (Phusion" Date: Wed, 27 Aug 2008 12:42:08 +0200 Subject: Deprecate Rails::SecretKeyGenerator in favor of ActiveSupport::SecureRandom. SecureRandom has a few minor security enhancements and can be used as a drop-in replacement Signed-off-by: Michael Koziarski [#913 state:committed] --- .../lib/rails_generator/generators/applications/app/app_generator.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'railties/lib/rails_generator/generators') diff --git a/railties/lib/rails_generator/generators/applications/app/app_generator.rb b/railties/lib/rails_generator/generators/applications/app/app_generator.rb index 80e8eabfd3..9849948339 100644 --- a/railties/lib/rails_generator/generators/applications/app/app_generator.rb +++ b/railties/lib/rails_generator/generators/applications/app/app_generator.rb @@ -1,6 +1,5 @@ require 'rbconfig' require 'digest/md5' -require 'rails_generator/secret_key_generator' class AppGenerator < Rails::Generator::Base DEFAULT_SHEBANG = File.join(Config::CONFIG['bindir'], @@ -36,7 +35,7 @@ class AppGenerator < Rails::Generator::Base md5 << @app_name # Do our best to generate a secure secret key for CookieStore - secret = Rails::SecretKeyGenerator.new(@app_name).generate_secret + secret = ActiveSupport::SecureRandom.hex(64) record do |m| # Root directory and all subdirectories. -- cgit v1.2.3