N°3251 - Null in data synchro (fixes the regression introduced in a1f5d80)

- restore the initial behavior, thanks to hipska through PR#166
- refactor so as to make it clear that no SQL injection is possible (and will never be)
- add PHPUnit tests on the data synchronization => up to 20s to execute
- fix utils::ExeciTopScript to alow its usage within the automated test
This commit is contained in:
rquetiez
2020-09-09 22:41:13 +02:00
parent b5cfd1c61e
commit f5a3bb2baa
4 changed files with 581 additions and 557 deletions

View File

@@ -999,19 +999,19 @@ class utils
throw new Exception("The path to php must not be empty. Please set a value for 'php_path' in your configuration file.");
}
$sAuthUser = self::ReadParam('auth_user', '', 'raw_data');
$sAuthPwd = self::ReadParam('auth_pwd', '', 'raw_data');
$sParamFile = self::GetParamSourceFile('auth_user');
if (is_null($sParamFile))
{
if (!isset($aArguments['auth_user'])) {
$sAuthUser = self::ReadParam('auth_user', '', 'raw_data');
$aArguments['auth_user'] = $sAuthUser;
}
if (!isset($aArguments['auth_pwd'])) {
$sAuthPwd = self::ReadParam('auth_pwd', '', 'raw_data');
$aArguments['auth_pwd'] = $sAuthPwd;
}
else
{
if (!isset($aArguments['param_file'])) {
$sParamFile = self::ReadParam('param_file', '', 'raw_data');
$aArguments['param_file'] = $sParamFile;
}
$aArgs = array();
foreach($aArguments as $sName => $value)
{