From cd9d5df963e7084a289915ae14c73d87c6770070 Mon Sep 17 00:00:00 2001 From: Mac Siri Date: Thu, 6 Jul 2023 17:38:56 -0400 Subject: [PATCH] Set hash_digest_class to SHA256 (#18364) --- config/application.rb | 3 --- config/initializers/new_framework_defaults_7_0.rb | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/config/application.rb b/config/application.rb index 1a050ddd8..4f8b84544 100644 --- a/config/application.rb +++ b/config/application.rb @@ -45,9 +45,6 @@ module PracticalDeveloper config.action_view.default_enforce_utf8 = true ## Rails 6.1 - # This replaces the old config.active_support.use_sha1_digests from Rails 5.2 - config.active_support.hash_digest_class = ::Digest::MD5 # New default is ::Digest::SHA1 - # Make `form_with` generate non-remote forms by default. We want this to be true as it was the default in 5.2 config.action_view.form_with_generates_remote_forms = true diff --git a/config/initializers/new_framework_defaults_7_0.rb b/config/initializers/new_framework_defaults_7_0.rb index b845498e7..ad70e396c 100644 --- a/config/initializers/new_framework_defaults_7_0.rb +++ b/config/initializers/new_framework_defaults_7_0.rb @@ -28,7 +28,7 @@ Rails.application.config.action_view.apply_stylesheet_media_default = false # Change the digest class for ActiveSupport::Digest. # Changing this default means that for example Etags change and # various cache keys leading to cache invalidation. -# Rails.application.config.active_support.hash_digest_class = OpenSSL::Digest::SHA256 +Rails.application.config.active_support.hash_digest_class = OpenSSL::Digest::SHA256 # Don't override ActiveSupport::TimeWithZone.name and use the default Ruby # implementation.