[ruby/yaml] Also use safe_load on YAML::Store
https://github.com/ruby/yaml/commit/09691d005f
This commit is contained in:
parent
21bac99122
commit
c1f6ad561b
@ -69,8 +69,8 @@ class YAML::Store < PStore
|
||||
end
|
||||
|
||||
def load(content)
|
||||
table = YAML.respond_to?(:unsafe_load) ? YAML.unsafe_load(content) : YAML.load(content)
|
||||
if table == false
|
||||
table = YAML.respond_to?(:safe_load) ? YAML.safe_load(content, permitted_classes: [Symbol]) : YAML.load(content)
|
||||
if table == false || table == nil
|
||||
{}
|
||||
else
|
||||
table
|
||||
|
Loading…
x
Reference in New Issue
Block a user