diff options
author | Eugene Kenny <elkenny@gmail.com> | 2017-12-22 22:13:19 +0000 |
---|---|---|
committer | Eugene Kenny <elkenny@gmail.com> | 2018-01-07 20:13:58 +0000 |
commit | d2113777a137bb6740d576cd75061782703f075b (patch) | |
tree | 87febcc0e62e623d3f23dec38f897a466a1caa6f /activesupport/lib/active_support/message_encryptor.rb | |
parent | 1ba8412607ae7190dc1c59718099e2f04372905d (diff) | |
download | rails-d2113777a137bb6740d576cd75061782703f075b.tar.gz rails-d2113777a137bb6740d576cd75061782703f075b.tar.bz2 rails-d2113777a137bb6740d576cd75061782703f075b.zip |
Allow use_authenticated_message_encryption to be set in new_framework_defaults_5_2.rb
Enabling this option in new_framework_defaults_5_2.rb didn't work
before, as railtie initializers run before application initializers.
Using `respond_to?` to decide whether to set the option wasn't working
either, as `ActiveSupport::OrderedOptions` responds to any message.
Diffstat (limited to 'activesupport/lib/active_support/message_encryptor.rb')
-rw-r--r-- | activesupport/lib/active_support/message_encryptor.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/message_encryptor.rb b/activesupport/lib/active_support/message_encryptor.rb index 27fd061947..5236c776dd 100644 --- a/activesupport/lib/active_support/message_encryptor.rb +++ b/activesupport/lib/active_support/message_encryptor.rb @@ -81,9 +81,9 @@ module ActiveSupport class MessageEncryptor prepend Messages::Rotator::Encryptor - class << self - attr_accessor :use_authenticated_message_encryption #:nodoc: + cattr_accessor :use_authenticated_message_encryption, instance_accessor: false, default: false + class << self def default_cipher #:nodoc: if use_authenticated_message_encryption "aes-256-gcm" |