diff options
author | Jose Luis Duran <jlduran@users.noreply.github.com> | 2018-04-18 18:29:27 -0300 |
---|---|---|
committer | Jose Luis Duran <jlduran@users.noreply.github.com> | 2018-04-19 08:44:08 -0300 |
commit | 4c6c3575c66ce10043c9ea04023788890a228de8 (patch) | |
tree | 01640e7a1e40ce32b0aa60314f241ec7e0f85bdf /railties/lib/rails | |
parent | 185fce159721b331cc9a0ae17b662373ee0fc95f (diff) | |
download | rails-4c6c3575c66ce10043c9ea04023788890a228de8.tar.gz rails-4c6c3575c66ce10043c9ea04023788890a228de8.tar.bz2 rails-4c6c3575c66ce10043c9ea04023788890a228de8.zip |
Make the master.key readable only by the owner
This change may only apply to POSIX-compliant systems.
Previously:
$ ls -l config/master.key
-rw-r--r-- 1 owner group 32 Jan 1 00:00 master.key
Now:
$ ls -l config/master.key
-rw------- 1 owner group 32 Jan 1 00:00 master.key
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/generators/rails/encryption_key_file/encryption_key_file_generator.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/rails/encryption_key_file/encryption_key_file_generator.rb b/railties/lib/rails/generators/rails/encryption_key_file/encryption_key_file_generator.rb index 90068c678d..e2359e9ded 100644 --- a/railties/lib/rails/generators/rails/encryption_key_file/encryption_key_file_generator.rb +++ b/railties/lib/rails/generators/rails/encryption_key_file/encryption_key_file_generator.rb @@ -27,6 +27,7 @@ module Rails def add_key_file_silently(key_path, key = nil) create_file key_path, key || ActiveSupport::EncryptedFile.generate_key + key_path.chmod 0600 end def ignore_key_file(key_path, ignore: key_ignore(key_path)) |