Don't allow path traversal or syntax overrides.

This commit is contained in:
Parker Moore 2014-01-12 15:37:09 -08:00
parent 4784d1de18
commit 8ecd2d9218
1 changed files with 8 additions and 0 deletions

View File

@ -77,6 +77,14 @@ CSS
should "default to :sass syntax when content is empty" do
assert_equal :sass, converter.sass_configs[:syntax]
end
should "not allow sass_dirs outside of site source" do
assert_equal source_dir("etc/passwd"), converter({"sass_dir" => "/etc/passwd"}).sass_dir_relative_to_site_source
end
should "override user-set syntax based on content" do
assert_equal :sass, converter({"syntax" => :scss}).sass_configs(sass_content)[:syntax]
end
end
context "converting sass" do