From 1aa249b59fc90ef34c49ec1685433166d8a196c3 Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Fri, 29 May 2026 17:40:05 +0200 Subject: [PATCH] Setup fast track (fix setup token) --- setup/wizard.php | 2 +- setup/wizardsteps/WizStepWelcome.php | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/setup/wizard.php b/setup/wizard.php index ae60b090d4..374fb71be9 100644 --- a/setup/wizard.php +++ b/setup/wizard.php @@ -70,5 +70,5 @@ if (SetupUtils::IsSessionSetupTokenValid()) { SetupUtils::ExitMaintenanceMode(false); // Force initializing the setup $oWizard->Start(); - SetupUtils::CreateSetupToken(); + //SetupUtils::CreateSetupToken(); } diff --git a/setup/wizardsteps/WizStepWelcome.php b/setup/wizardsteps/WizStepWelcome.php index 2db53d59b9..be2338c0ce 100644 --- a/setup/wizardsteps/WizStepWelcome.php +++ b/setup/wizardsteps/WizStepWelcome.php @@ -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( << @@ -134,8 +133,8 @@ HTML - - + +