diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2012-11-02 20:26:11 -0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2012-11-03 14:57:54 -0200 |
commit | 5d23925f84f0241e28b3fbce740150136ba08254 (patch) | |
tree | 827b0954d7ee8528c7b827814172cc0b60aff92e /railties/lib/rails | |
parent | fb0cea2b8cf61cde1aa4c640b56e896fbe308aa1 (diff) | |
download | rails-5d23925f84f0241e28b3fbce740150136ba08254.tar.gz rails-5d23925f84f0241e28b3fbce740150136ba08254.tar.bz2 rails-5d23925f84f0241e28b3fbce740150136ba08254.zip |
Use derived keys everywhere, http_authentication was missing it
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/application.rb | 5 | ||||
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 8 |
2 files changed, 5 insertions, 8 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 741b03d80e..f9867721a2 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -120,7 +120,6 @@ module Rails # Currently stores: # # * "action_dispatch.parameter_filter" => config.filter_parameters, - # * "action_dispatch.secret_token" => config.secret_token, # * "action_dispatch.show_exceptions" => config.action_dispatch.show_exceptions, # * "action_dispatch.show_detailed_exceptions" => config.consider_all_requests_local, # * "action_dispatch.logger" => Rails.logger, @@ -135,11 +134,13 @@ module Rails ActiveSupport::Deprecation.warn "You didn't set config.secret_token_key. " + "This should be used instead of the old deprecated config.secret_token. " + "Set config.secret_token_key instead of config.secret_token in config/initializers/secret_token.rb" + if config.secret_token.blank? + raise "You must set config.secret_token_key in your app's config" + end end super.merge({ "action_dispatch.parameter_filter" => config.filter_parameters, - "action_dispatch.secret_token" => config.secret_token, "action_dispatch.show_exceptions" => config.action_dispatch.show_exceptions, "action_dispatch.show_detailed_exceptions" => config.consider_all_requests_local, "action_dispatch.logger" => Rails.logger, diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index b01b97aa67..0faa62c86c 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -10,12 +10,12 @@ module Rails :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :log_tags, - :railties_order, :relative_url_root, :secret_token_key, + :railties_order, :relative_url_root, :secret_token, :secret_token_key, :serve_static_assets, :ssl_options, :static_cache_control, :session_options, :time_zone, :reload_classes_only_on_change, :queue, :queue_consumer, :beginning_of_week - attr_writer :secret_token, :log_level + attr_writer :log_level attr_reader :encoding def initialize(*) @@ -146,10 +146,6 @@ module Rails def whiny_nils=(*) ActiveSupport::Deprecation.warn "config.whiny_nils option is deprecated and no longer works" end - - def secret_token - @secret_token_key || @secret_token - end end end end |