Skip to content

Commit

Permalink
update/fix yaml safe load arguments in recursive hot file loader
Browse files Browse the repository at this point in the history
  • Loading branch information
geemus committed Mar 19, 2024
1 parent 3354509 commit 4aee4a0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ def get_template_contents(template_file)
template = template_file
elsif template_is_raw?(template_file)
template_base_url = local_base_url
template = YAML.safe_load(template_file, [Date])
template = YAML.safe_load(template_file, :permitted_classes => [Date])
elsif template_is_url?(template_file)
template_file = normalise_file_path_to_url(template_file)
template_base_url = base_url_for_url(template_file)
raw_template = read_uri(template_file)
template = YAML.safe_load(raw_template, [Date])
template = YAML.safe_load(raw_template, :permitted_classes => [Date])

Fog::Logger.debug("Template visited: #{@visited}")
@visited.add(template_file)
Expand Down Expand Up @@ -212,7 +212,7 @@ def normalise_file_path_to_url(path)
def deep_copy(item)
return item if item.kind_of?(String)

YAML.safe_load(YAML.dump(item), [Date])
YAML.safe_load(YAML.dump(item), :permitted_classes => [Date])
end
end
end
Expand Down

0 comments on commit 4aee4a0

Please sign in to comment.