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

# Conflicts:
#	datamodels/2.x/itop-hub-connector/launch.php
This commit is contained in:
jf-cbd
2024-04-23 14:03:15 +02:00
4 changed files with 93 additions and 15 deletions

View File

@@ -2616,6 +2616,11 @@ class WizStepDone extends WizardStep
$oProductionEnv->InitDataModel($oConfig, true);
$sIframeUrl = $oConfig->GetModuleSetting('itop-hub-connector', 'setup_url', '');
$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>');