Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix chmod race condition when generating key #48141

Merged
merged 1 commit into from
May 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ PATH
irb
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)

GEM
Expand Down Expand Up @@ -517,7 +517,7 @@ GEM
railties (>= 6.0.0)
terser (1.1.13)
execjs (>= 0.3.0, < 3)
thor (1.2.1)
thor (1.2.2)
tilt (2.0.11)
timeout (0.3.2)
tomlrb (2.0.3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ def add_key_file(key_path)
end

def add_key_file_silently(key_path, key = nil)
create_file key_path, key || ActiveSupport::EncryptedFile.generate_key
key_path.chmod 0600
create_file key_path, key || ActiveSupport::EncryptedFile.generate_key, perm: 0600
end

def ignore_key_file(key_path, ignore: key_ignore(key_path))
Expand Down
2 changes: 1 addition & 1 deletion railties/railties.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Gem::Specification.new do |s|

s.add_dependency "rackup", ">= 1.0.0"
s.add_dependency "rake", ">= 12.2"
s.add_dependency "thor", "~> 1.0"
s.add_dependency "thor", "~> 1.0", ">= 1.2.2"
s.add_dependency "zeitwerk", "~> 2.6"
s.add_dependency "irb"

Expand Down