diff options
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/secrets.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/railties/lib/rails/secrets.rb b/railties/lib/rails/secrets.rb index f42515f47d..77d9249c56 100644 --- a/railties/lib/rails/secrets.rb +++ b/railties/lib/rails/secrets.rb @@ -39,8 +39,7 @@ module Rails end def key - [(ENV["RAILS_MASTER_KEY"] || read_key_file || handle_missing_key)] - .pack("H*") + ENV["RAILS_MASTER_KEY"] || read_key_file || handle_missing_key end def encrypt(data) @@ -103,7 +102,7 @@ module Rails end def encryptor - @encryptor ||= ActiveSupport::MessageEncryptor.new(key, cipher: CIPHER) + @encryptor ||= ActiveSupport::MessageEncryptor.new([ key ].pack("H*"), cipher: CIPHER) end end end |