Sanitize rootResourcePath

This commit is contained in:
James Allen
2015-02-11 12:03:36 +00:00
parent c84bd4fa3f
commit 90cda12ed9
2 changed files with 13 additions and 2 deletions

View File

@@ -204,6 +204,13 @@ describe "RequestParser", ->
@callback.calledWith("rootResourcePath attribute should be a string")
.should.equal true
describe "with a root resource path that needs escaping", ->
beforeEach ->
@validRequest.compile.rootResourcePath = "`rm -rf foo`.tex"
@RequestParser.parse @validRequest, @callback
@data = @callback.args[0][1]
it "should return the escaped resource", ->
@data.rootResourcePath.should.equal "rm -rf foo.tex"