diff options
author | Ryo Hashimoto <ryohashimoto@gmail.com> | 2016-02-03 10:13:38 +0900 |
---|---|---|
committer | Ryo Hashimoto <ryohashimoto@gmail.com> | 2016-02-03 10:13:38 +0900 |
commit | c8ac079413acca3f62d4e15bb1b5a1c5bf7d2039 (patch) | |
tree | 02959cd0bda3d0a2a51992e1b68abee21ac00a30 /guides | |
parent | 49e0c4e8642a0160bd01c4490b4babe89108da48 (diff) | |
download | rails-c8ac079413acca3f62d4e15bb1b5a1c5bf7d2039.tar.gz rails-c8ac079413acca3f62d4e15bb1b5a1c5bf7d2039.tar.bz2 rails-c8ac079413acca3f62d4e15bb1b5a1c5bf7d2039.zip |
use rails secret in rails guides
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/security.md | 2 | ||||
-rw-r--r-- | guides/source/upgrading_ruby_on_rails.md | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/security.md b/guides/source/security.md index 1d0e87d831..96b9f4bcce 100644 --- a/guides/source/security.md +++ b/guides/source/security.md @@ -102,7 +102,7 @@ Thus the session becomes a more secure place to store data. The encryption is done using a server-side secret key `secrets.secret_key_base` stored in `config/secrets.yml`. -That means the security of this storage depends on this secret (and on the digest algorithm, which defaults to SHA1, for compatibility). So _don't use a trivial secret, i.e. a word from a dictionary, or one which is shorter than 30 characters, use `rake secret` instead_. +That means the security of this storage depends on this secret (and on the digest algorithm, which defaults to SHA1, for compatibility). So _don't use a trivial secret, i.e. a word from a dictionary, or one which is shorter than 30 characters, use `rails secret` instead_. `secrets.secret_key_base` is used for specifying a key which allows sessions for the application to be verified against a known secure key to prevent tampering. Applications get `secrets.secret_key_base` initialized to a random key present in `config/secrets.yml`, e.g.: diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md index 202e5b5cb9..e631445492 100644 --- a/guides/source/upgrading_ruby_on_rails.md +++ b/guides/source/upgrading_ruby_on_rails.md @@ -402,7 +402,7 @@ secrets, you need to: 3. Remove the `secret_token.rb` initializer. -4. Use `rake secret` to generate new keys for the `development` and `test` sections. +4. Use `rails secret` to generate new keys for the `development` and `test` sections. 5. Restart your server. |