N°2538 check path validity little improvements

* ajax-backup : change code to be more readable
* does a realpath() call on basepath to avoid troubles when havin '/' on Windows
This commit is contained in:
Pierre Goiffon
2019-10-16 11:32:31 +02:00
parent 607d355c61
commit f65f22f333
3 changed files with 11 additions and 6 deletions

View File

@@ -83,6 +83,11 @@ class UtilsTest extends \Combodo\iTop\Test\UnitTest\ItopTestCase
$sItopRootPath.'application',
$sItopRootPath.'application'.$sSep.'utils.inc.php',
],
'basepath containing / and \\' => [
$sItopRootPath.'sources/form/form.class.inc.php',
$sItopRootPath.'sources/form\\form.class.inc.php',
$sItopRootPath.'sources'.$sSep.'form'.$sSep.'form.class.inc.php',
],
];
}
}