Setup fast track (fix setup token)

This commit is contained in:
Eric Espie
2026-05-29 17:40:05 +02:00
parent 6f34a4799c
commit 1aa249b59f
2 changed files with 6 additions and 7 deletions

View File

@@ -70,5 +70,5 @@ if (SetupUtils::IsSessionSetupTokenValid()) {
SetupUtils::ExitMaintenanceMode(false);
// Force initializing the setup
$oWizard->Start();
SetupUtils::CreateSetupToken();
//SetupUtils::CreateSetupToken();
}

View File

@@ -27,11 +27,13 @@ class WizStepWelcome extends WizardStep
private array $aInfo;
private array $aWarnings;
private array $aErrors;
private string $sUID;
public function __construct(WizardController $oWizard, $sCurrentState)
{
parent::__construct($oWizard, $sCurrentState);
$this->CheckInstallation();
$this->sUID = SetupUtils::CreateSetupToken();
}
public function GetTitle()
@@ -55,8 +57,7 @@ class WizStepWelcome extends WizardStep
public function UpdateWizardStateAndGetNextStep($bMoveForward = true): WizardState
{
$sUID = SetupUtils::CreateSetupToken();
$this->oWizard->SetParameter('authent', $sUID);
$this->oWizard->SetParameter('authent', $this->sUID);
return new WizardState(WizStepInstallOrUpgrade::class);
}
@@ -124,8 +125,6 @@ HTML
if ($this->bCanMoveForward) {
$sBuildConfigFile = APPCONF.ITOP_DEFAULT_ENV.'/'.ITOP_CONFIG_FILE;
if (file_exists($sBuildConfigFile)) {
$oContextTag = new ContextTag(ContextTag::TAG_SETUP);
$sToken = SetupUtils::CreateSetupToken();
$oPage->add(
<<<HTML
<fieldset>
@@ -134,8 +133,8 @@ HTML
<input type="hidden" name="_class" value="WizStepLandingBeforeAudit"/>
<input type="hidden" name="operation" value="next"/>
<input type="hidden" name="_params[skip_wizard]" value="1"/>
<input type="hidden" name="authent" value="$sToken"/>
<input type="hidden" name="_params[authent]" value="$sToken"/>
<input type="hidden" name="authent" value="{$this->sUID}"/>
<input type="hidden" name="_params[authent]" value="{$this->sUID}"/>
<table style="width:100%;" class="ibo-setup--wizard--buttons-container">
<tr>
<td style="text-align: right"><button type="submit" class="ibo-button ibo-is-regular ibo-is-secondary">Skip to Compatibility checking</button></td>