mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-22 12:55:56 +01:00
Change Active Record Encryption variable check to check for emptiness (#32537)
This commit is contained in:
parent
6c87c76e18
commit
6ff1954bdb
2 changed files with 4 additions and 1 deletions
|
@ -50,6 +50,7 @@ OTP_SECRET=
|
||||||
# Must be available (and set to same values) for all server processes
|
# Must be available (and set to same values) for all server processes
|
||||||
# These are private/secret values, do not share outside hosting environment
|
# These are private/secret values, do not share outside hosting environment
|
||||||
# Use `bin/rails db:encryption:init` to generate fresh secrets
|
# Use `bin/rails db:encryption:init` to generate fresh secrets
|
||||||
|
# Do not change these secrets once in use, as this would cause data loss and other issues
|
||||||
# ------------------
|
# ------------------
|
||||||
# ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY=
|
# ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY=
|
||||||
# ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT=
|
# ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT=
|
||||||
|
|
|
@ -10,7 +10,9 @@
|
||||||
ENV[key] = SecureRandom.hex(64)
|
ENV[key] = SecureRandom.hex(64)
|
||||||
end
|
end
|
||||||
|
|
||||||
value = ENV.fetch(key) do
|
value = ENV.fetch(key, '')
|
||||||
|
|
||||||
|
if value.blank?
|
||||||
abort <<~MESSAGE
|
abort <<~MESSAGE
|
||||||
|
|
||||||
Mastodon now requires that these variables are set:
|
Mastodon now requires that these variables are set:
|
||||||
|
|
Loading…
Reference in a new issue