Merge remote-tracking branch 'refs/remotes/origin/support/3.0' into support/3.1

# Conflicts:
#	datamodels/2.x/itop-hub-connector/launch.php
#	setup/wizardsteps.class.inc.php
This commit is contained in:
jf-cbd
2024-04-23 14:13:40 +02:00
4 changed files with 87 additions and 8 deletions

View File

@@ -2589,7 +2589,13 @@ class WizStepDone extends WizardStep
$oProductionEnv->InitDataModel($oConfig, true);
$sIframeUrl = $oConfig->GetModuleSetting('itop-hub-connector', 'setup_url', '');
if ($sIframeUrl != '') {
$sSetupTokenFile = APPROOT.'data/.setup';
$sSetupToken = bin2hex(random_bytes(12));
file_put_contents($sSetupTokenFile, $sSetupToken);
$sIframeUrl.= "&setup_token=$sSetupToken";
if ($sIframeUrl != '')
{
$oPage->add('<iframe id="fresh_content" frameborder="0" scrolling="auto" src="'.$sIframeUrl.'"></iframe>');
$oPage->add_script("