diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2018-01-12 15:03:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-12 15:03:32 -0700 |
commit | f8afb5168aed810a061d081d3941c9dc9bd633c3 (patch) | |
tree | 029539470990dd29e272dea53ff6fe1ed8bc1705 /activesupport/lib | |
parent | aa0541e686d5e275315670b374b6c379cc67bc33 (diff) | |
parent | d034f488f9c2d694bcad9950df0310ca869956e0 (diff) | |
download | rails-f8afb5168aed810a061d081d3941c9dc9bd633c3.tar.gz rails-f8afb5168aed810a061d081d3941c9dc9bd633c3.tar.bz2 rails-f8afb5168aed810a061d081d3941c9dc9bd633c3.zip |
Merge pull request #31651 from eugeneius/use_sha1_digests
Use SHA-1 for non-sensitive digests by default
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/railtie.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/railtie.rb b/activesupport/lib/active_support/railtie.rb index 6b8fa676a9..605b50d346 100644 --- a/activesupport/lib/active_support/railtie.rb +++ b/activesupport/lib/active_support/railtie.rb @@ -70,9 +70,10 @@ module ActiveSupport end initializer "active_support.set_hash_digest_class" do |app| - if app.config.active_support.hash_digest_class - ActiveSupport::Digest.hash_digest_class = - app.config.active_support.hash_digest_class + config.after_initialize do + if app.config.active_support.use_sha1_digests + ActiveSupport::Digest.hash_digest_class = ::Digest::SHA1 + end end end end |