1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-02 04:24:56 +02:00

[ticket/11362] Add unit test for ../ in directory paths

PHPBB3-11362
This commit is contained in:
Joas Schilling 2013-03-12 22:45:44 +01:00
parent 567eefb2bd
commit 1fd5be859e

View File

@ -6,6 +6,7 @@
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
class phpbb_extension_finder_test extends phpbb_test_case
{
@ -142,6 +143,21 @@ class phpbb_extension_finder_test extends phpbb_test_case
);
}
public function test_uncleansub_directory_get_classes()
{
$classes = $this->finder
->directory('/sub/../sub/type')
->get_classes();
sort($classes);
$this->assertEquals(
array(
'phpbb_ext_foo_sub_type_alternative',
),
$classes
);
}
/**
* These do not work because of changes with PHPBB3-11386
* They do not seem neccessary to me, so I am commenting them out for now