mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix secrets.yml path in exception message
The file is config/secrets.yml, not config/initializers/secrets.yml.
This commit is contained in:
parent
06849fd4d0
commit
f63c6e57ee
1 changed files with 7 additions and 9 deletions
|
@ -57,18 +57,16 @@ module ActiveSupport
|
|||
# secret they've provided is at least 30 characters in length.
|
||||
def ensure_secret_secure(secret)
|
||||
if secret.blank?
|
||||
raise ArgumentError, "A secret is required to generate an " +
|
||||
"integrity hash for cookie session data. Set a " +
|
||||
"secret_key_base of at least " +
|
||||
"#{SECRET_MIN_LENGTH} characters " +
|
||||
"in config/initializers/secrets.yml"
|
||||
raise ArgumentError, "A secret is required to generate an integrity hash " \
|
||||
"for cookie session data. Set a secret_key_base of at least " \
|
||||
"#{SECRET_MIN_LENGTH} characters in config/secrets.yml."
|
||||
end
|
||||
|
||||
if secret.length < SECRET_MIN_LENGTH
|
||||
raise ArgumentError, "Secret should be something secure, " +
|
||||
"like \"#{SecureRandom.hex(16)}\". The value you " +
|
||||
"provided, \"#{secret}\", is shorter than the minimum length " +
|
||||
"of #{SECRET_MIN_LENGTH} characters"
|
||||
raise ArgumentError, "Secret should be something secure, " \
|
||||
"like \"#{SecureRandom.hex(16)}\". The value you " \
|
||||
"provided, \"#{secret}\", is shorter than the minimum length " \
|
||||
"of #{SECRET_MIN_LENGTH} characters."
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue