aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/railtie.rb
diff options
context:
space:
mode:
authorAssain <assainjaleel20@gmail.com>2017-06-03 01:21:10 +0530
committerAssain <assainjaleel20@gmail.com>2017-06-12 00:29:16 +0530
commit7440bf44baea53de950093ebf9ee4e8a3ed71066 (patch)
tree18f3fd9748a64e06da43e59812e128b738785f5d /activesupport/lib/active_support/railtie.rb
parentd1d39710cc4c525ab8f515eba70cb9ab4134fc64 (diff)
downloadrails-7440bf44baea53de950093ebf9ee4e8a3ed71066.tar.gz
rails-7440bf44baea53de950093ebf9ee4e8a3ed71066.tar.bz2
rails-7440bf44baea53de950093ebf9ee4e8a3ed71066.zip
set message_encryptor default cipher to aes-256-gcm
- Introduce a method to select default cipher, and maintain backward compatibility
Diffstat (limited to 'activesupport/lib/active_support/railtie.rb')
-rw-r--r--activesupport/lib/active_support/railtie.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/railtie.rb b/activesupport/lib/active_support/railtie.rb
index 1b4ecf4d72..61d6e4aae3 100644
--- a/activesupport/lib/active_support/railtie.rb
+++ b/activesupport/lib/active_support/railtie.rb
@@ -7,6 +7,13 @@ module ActiveSupport
config.eager_load_namespaces << ActiveSupport
+ initializer "active_support.set_authenticated_message_encryption" do |app|
+ if app.config.active_support.respond_to?(:use_authenticated_message_encryption)
+ ActiveSupport::MessageEncryptor.use_authenticated_message_encryption =
+ app.config.active_support.use_authenticated_message_encryption
+ end
+ end
+
initializer "active_support.reset_all_current_attributes_instances" do |app|
app.reloader.before_class_unload { ActiveSupport::CurrentAttributes.clear_all }
app.executor.to_run { ActiveSupport::CurrentAttributes.reset_all }