mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2026-07-17 16:39:40 +00: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:
parent
dae5f7fd61
commit
f2164353c3
2 changed files with 22 additions and 4 deletions
|
|
@ -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');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue