added tests for full path leak to source directory when using include tag
This commit is contained in:
parent
4c140efba8
commit
82bee23bd0
|
@ -487,6 +487,25 @@ CONTENT
|
|||
end
|
||||
end
|
||||
|
||||
context "include missing file" do
|
||||
setup do
|
||||
@content = <<CONTENT
|
||||
---
|
||||
title: missing file
|
||||
---
|
||||
|
||||
{% include missing.html %}
|
||||
CONTENT
|
||||
end
|
||||
|
||||
should "raise error relative to source directory" do
|
||||
exception = assert_raise IOError do
|
||||
create_post(@content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
|
||||
end
|
||||
assert_equal 'Included file \'_includes/missing.html\' not found', exception.message
|
||||
end
|
||||
end
|
||||
|
||||
context "include tag with variable and liquid filters" do
|
||||
setup do
|
||||
stub(Jekyll).configuration do
|
||||
|
|
Loading…
Reference in New Issue