Skip to content

Commit 0d39bff

Browse files
committed
Safe YAML loading.
Allow only Time among primitives.
1 parent 7c1d938 commit 0d39bff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/nanoc/github.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def client
2727
def decode(content)
2828
content = Base64.decode64(content)
2929
matchdata = content.match(REGEX)
30-
metadata = matchdata ? YAML.load(matchdata[:metadata]) : {}
30+
metadata = matchdata ? YAML.safe_load(matchdata[:metadata], permitted_classes: [Time]) : {}
3131

3232
[metadata, content.gsub(REGEX, '')]
3333
end

0 commit comments

Comments
 (0)