From 95e4bf945ce0763ecee5de3442f5c987a662850d Mon Sep 17 00:00:00 2001 From: Alex Turchyn Date: Sun, 9 Jul 2023 19:09:50 +0300 Subject: [PATCH] use sha256 on rails key_derivation_salt --- config/environments/production.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index 24d0deeb..45e74ce2 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -110,7 +110,7 @@ Rails.application.configure do config.active_record.encryption = { primary_key: encryption_secret.first(32), deterministic_key: encryption_secret.last(32), - key_derivation_salt: encryption_secret + key_derivation_salt: Digest::SHA256.hexdigest(encryption_secret) } # Do not dump schema after migrations.