Skip to content
Permalink
Browse files

allow filename containning double dot

  • Loading branch information...
antograssiot committed Jul 15, 2015
1 parent 69e5226 commit bbe8bbff4988afca2dd31419b79449391cc0fb80
Showing with 13 additions and 0 deletions.
  1. +13 −0 tests/TestCase/Network/ResponseTest.php
@@ -1159,13 +1159,26 @@ public function testFileNotFound()
* test file with ..
*
* @expectedException \Cake\Network\Exception\NotFoundException
* @expectedExceptionMessage The requested file contains `..` and will not be read.
* @return void
*/
public function testFileWithPathTraversal()
{
$response = new Response();
$response->file('my/../cat.gif');
}
/**
* test file with ..
*
* @expectedException \Cake\Network\Exception\NotFoundException
* @expectedExceptionMessage my/ca..t.gif was not found or not readable
* @return void
*/
public function testFileWithDotIntheName()
{
$response = new Response();
$response->file('my/ca..t.gif');
}
/**
* testFile method

0 comments on commit bbe8bbf

Please sign in to comment.
You can’t perform that action at this time.