aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorAndrew White <pixeltrix@users.noreply.github.com>2018-04-19 14:09:21 +0100
committerGitHub <noreply@github.com>2018-04-19 14:09:21 +0100
commit1a32e058a3a9b5f2e7b2930e1177de2f23aa8555 (patch)
treeae216f1a7f832ae8a14f380f21b647d66c7717da /railties/lib
parent9cfbcce8ad134b1b3153d4a4d08207bf1e3d0598 (diff)
parent4c6c3575c66ce10043c9ea04023788890a228de8 (diff)
downloadrails-1a32e058a3a9b5f2e7b2930e1177de2f23aa8555.tar.gz
rails-1a32e058a3a9b5f2e7b2930e1177de2f23aa8555.tar.bz2
rails-1a32e058a3a9b5f2e7b2930e1177de2f23aa8555.zip
Merge pull request #32627 from jlduran/make-master-key-readable-only-by-owner
Make the master.key readable only by the owner
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/generators/rails/encryption_key_file/encryption_key_file_generator.rb1
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))