diff --git a/tests/Unit/Libraries/Cms/Form/Rule/FilePathRuleTest.php b/tests/Unit/Libraries/Cms/Form/Rule/FilePathRuleTest.php index bb75ac4f89570..5cf583cc35c8f 100644 --- a/tests/Unit/Libraries/Cms/Form/Rule/FilePathRuleTest.php +++ b/tests/Unit/Libraries/Cms/Form/Rule/FilePathRuleTest.php @@ -38,14 +38,13 @@ public function dataTest(): array size="50" default="images" validate="filePath" + exclude="administrator|media" />' ); - // These all pass today, - // BUT, Joomla 3.9.26 SHOULD break this test, as a security fix is applied, thus proving the test valuable return [ [true, $xml, ''], - [false, $xml, '.images'], + [true, $xml, '.images'], [false, $xml, './images'], [false, $xml, '.\images'], [false, $xml, '../images'], @@ -54,19 +53,19 @@ public function dataTest(): array [false, $xml, '\\images'], // Means \images [true, $xml, 'ftp://images'], [true, $xml, 'http://images'], - [true, $xml, 'media'], - [true, $xml, 'administrator'], + [false, $xml, 'media'], + [false, $xml, 'administrator'], [false, $xml, '/4711images'], - [false, $xml, '4711images'], - [false, $xml, '1'], - [false, $xml, '_'], - [false, $xml, '*'], - [false, $xml, '%'], - [false, $xml, '://foo'], + [true, $xml, '4711images'], + [true, $xml, '1'], + [true, $xml, '_'], + [true, $xml, '*'], + [true, $xml, '%'], + [true, $xml, '://foo'], [false, $xml, '/4711i/images'], [false, $xml, '../4711i/images'], - [false, $xml, 'Εικόνες'], - [false, $xml, 'Изображений'], + [true, $xml, 'Εικόνες'], + [true, $xml, 'Изображений'], ]; }