mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2026-04-18 21:48:24 -04:00
use realpath and validate tpl directory contents
to ensure only php files inside the tpl dir can get used as templates
This commit is contained in:
@@ -141,4 +141,13 @@ class ViewTest extends TestCase
|
||||
$this->expectExceptionCode(80);
|
||||
$test->draw('123456789 does not exist!');
|
||||
}
|
||||
|
||||
public function testInvalidTemplate()
|
||||
{
|
||||
$test = new View;
|
||||
$this->expectException(Exception::class);
|
||||
$this->expectExceptionCode(81);
|
||||
$test->draw('../index');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user