Skip to content

Commit

Permalink
Fix Psych::DisallowedClass error when running YAML.safe_load
Browse files Browse the repository at this point in the history
  • Loading branch information
kwkwan committed Dec 4, 2024
1 parent 846b0af commit 0ca8ec4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/expressir/express/cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def self.from_file(file, root_path: nil, test_overwrite_version: nil)

yaml_compressed = File.binread(file)
yaml = Zlib::Inflate.inflate(yaml_compressed)
hash = YAML.safe_load(yaml)
hash = YAML.safe_load(yaml, permitted_classes: [Symbol])
cache = Model::ModelElement.from_hash(hash, root_path: root_path)

if cache.version != version
Expand Down

0 comments on commit 0ca8ec4

Please sign in to comment.