forked from e621ng/e621ng
[Rails] Remove 6.1 -> 7.0 cookie rotator
Earlier than I wrote in the message but people had ample time to login by now
This commit is contained in:
parent
e6d3fabc2a
commit
9104ce1461
@ -1,15 +0,0 @@
|
||||
# NOTE: Remove after 2023-12-08
|
||||
Rails.application.config.after_initialize do
|
||||
Rails.application.config.action_dispatch.cookies_rotations.tap do |cookies|
|
||||
salt = Rails.application.config.action_dispatch.authenticated_encrypted_cookie_salt
|
||||
secret_key_base = Rails.application.secret_key_base
|
||||
|
||||
key_generator = ActiveSupport::KeyGenerator.new(
|
||||
secret_key_base, iterations: 1000, hash_digest_class: OpenSSL::Digest::SHA1
|
||||
)
|
||||
key_len = ActiveSupport::MessageEncryptor.key_len
|
||||
secret = key_generator.generate_key(salt, key_len)
|
||||
|
||||
cookies.rotate :encrypted, secret
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user