Skip to content

Commit

Permalink
Add test to demonstrate Denial of Service issue
Browse files Browse the repository at this point in the history
  • Loading branch information
frankdean committed Jul 17, 2020
1 parent 89af84a commit 64151eb
Show file tree
Hide file tree
Showing 2 changed files with 1,203 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/integration/node-static-test.js
Expand Up @@ -95,6 +95,22 @@ suite.addBatch({
}
}
})
.addBatch({
'requesting a forbidden URI /%00': {
topic : function(){
request.get(TEST_SERVER + '/%00', this.callback);
},
'should respond with 403' : function(error, response, body){
assert.equal(response.statusCode, 403);
},
'should respond without content-type header': function(error, response, body){
assert.isUndefined(response.headers['content-type']);
},
'should respond with empty body': function(error, response, body){
assert.isEmpty(body);
}
}
})
.addBatch({
'serving empty.css': {
topic : function(){
Expand Down

0 comments on commit 64151eb

Please sign in to comment.