Skip to content

Commit 8a27a4d

Browse files
committed
Switch encryption algorithm to SHA1
1 parent 14da70f commit 8a27a4d

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

config/application.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ class Application < Rails::Application
1919
# Initialize configuration defaults for originally generated Rails version.
2020
config.load_defaults 7.0
2121

22+
# Rails used SHA1 to encrypt attributes before, now it uses SHA256
23+
# TODO: Reencrypt the secrets
24+
# HACK: For now we set the old SHA1 algorithm
25+
config.active_support.hash_digest_class = OpenSSL::Digest::SHA1
26+
config.active_support.key_generator_hash_digest_class = OpenSSL::Digest::SHA1
27+
2228
config.autoloader = :zeitwerk
2329

2430
# Settings in config/environments/* take precedence over those specified here.

0 commit comments

Comments
 (0)