We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ccb6657 + 0ebb708 commit 7179dcbCopy full SHA for 7179dcb
railties/lib/rails/secrets.rb
@@ -25,7 +25,10 @@ def parse(paths, env:)
25
paths.each_with_object(Hash.new) do |path, all_secrets|
26
require "erb"
27
28
- secrets = YAML.load(ERB.new(preprocess(path)).result) || {}
+ source = ERB.new(preprocess(path)).result
29
+ secrets = YAML.respond_to?(:unsafe_load) ? YAML.unsafe_load(source) : YAML.load(source)
30
+ secrets ||= {}
31
+
32
all_secrets.merge!(secrets["shared"].deep_symbolize_keys) if secrets["shared"]
33
all_secrets.merge!(secrets[env].deep_symbolize_keys) if secrets[env]
34
end
0 commit comments