‪TYPO3CMS  ‪main
TYPO3\CMS\Install\Middleware\Maintenance Class Reference
Inheritance diagram for TYPO3\CMS\Install\Middleware\Maintenance:

Public Member Functions

 __construct (protected readonly FailsafePackageManager $packageManager, protected readonly ConfigurationManager $configurationManager, protected readonly PasswordHashFactory $passwordHashFactory, protected readonly ContainerInterface $container, protected readonly FormProtectionFactory $formProtectionFactory, protected readonly SessionService $sessionService)
 
 process (ServerRequestInterface $request, RequestHandlerInterface $handler)
 

Protected Member Functions

 canHandleRequest ()
 
 checkEnableInstallToolFile ()
 
 checkSessionToken (ServerRequestInterface $request)
 
bool checkSessionLifetime (ServerRequestInterface $request)
 
bool checkIfEssentialConfigurationExists ()
 
 enforceReferrer (ServerRequestInterface $request)
 

Protected Attributes

array $controllers
 

Detailed Description

Default middleware for all requests inside the TYPO3 Install Tool, which does a simple hardcoded dispatching to a controller based on the get/post variable.

This class is only meant to be used within EXT:install and is not part of the TYPO3 Core API.

Definition at line 54 of file Maintenance.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Install\Middleware\Maintenance::__construct ( protected readonly FailsafePackageManager  $packageManager,
protected readonly ConfigurationManager  $configurationManager,
protected readonly PasswordHashFactory  $passwordHashFactory,
protected readonly ContainerInterface  $container,
protected readonly FormProtectionFactory  $formProtectionFactory,
protected readonly SessionService  $sessionService 
)

Definition at line 69 of file Maintenance.php.

Member Function Documentation

◆ canHandleRequest()

TYPO3\CMS\Install\Middleware\Maintenance::canHandleRequest ( )
protected

This request handler is only accessible when basic system integrity constraints are fulfilled.

Definition at line 242 of file Maintenance.php.

References TYPO3\CMS\Install\Middleware\Maintenance\checkIfEssentialConfigurationExists(), and TYPO3\CMS\Install\Service\EnableFileService\isFirstInstallAllowed().

Referenced by TYPO3\CMS\Install\Middleware\Maintenance\process().

◆ checkEnableInstallToolFile()

TYPO3\CMS\Install\Middleware\Maintenance::checkEnableInstallToolFile ( )
protected

Checks if ENABLE_INSTALL_TOOL exists.

Definition at line 254 of file Maintenance.php.

References TYPO3\CMS\Install\Service\EnableFileService\checkInstallToolEnableFile().

Referenced by TYPO3\CMS\Install\Middleware\Maintenance\process().

◆ checkIfEssentialConfigurationExists()

bool TYPO3\CMS\Install\Middleware\Maintenance::checkIfEssentialConfigurationExists ( )
protected

Check if system/settings.php exists (PackageStates is optional)

Returns
‪bool TRUE when the essential configuration is available, otherwise FALSE

Definition at line 311 of file Maintenance.php.

References TYPO3\CMS\Core\Core\Environment\getLegacyConfigPath().

Referenced by TYPO3\CMS\Install\Middleware\Maintenance\canHandleRequest().

◆ checkSessionLifetime()

bool TYPO3\CMS\Install\Middleware\Maintenance::checkSessionLifetime ( ServerRequestInterface  $request)
protected

Check if session expired. If the session has expired, the login form is displayed.

Returns
‪bool True if session lifetime is OK

Definition at line 295 of file Maintenance.php.

Referenced by TYPO3\CMS\Install\Middleware\Maintenance\process().

◆ checkSessionToken()

TYPO3\CMS\Install\Middleware\Maintenance::checkSessionToken ( ServerRequestInterface  $request)
protected

Use form protection API to find out if protected POST forms are ok.

Definition at line 262 of file Maintenance.php.

Referenced by TYPO3\CMS\Install\Middleware\Maintenance\process().

◆ enforceReferrer()

TYPO3\CMS\Install\Middleware\Maintenance::enforceReferrer ( ServerRequestInterface  $request)
protected

Evaluates HTTP Referer header (which is denied by client to be a custom value) - attempts to ensure the value is given using a HTML client refresh. see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer

Definition at line 334 of file Maintenance.php.

Referenced by TYPO3\CMS\Install\Middleware\Maintenance\process().

◆ process()

Member Data Documentation

◆ $controllers

array TYPO3\CMS\Install\Middleware\Maintenance::$controllers
protected
Initial value:
= [
'icon' => IconController::class,
'layout' => LayoutController::class,
'login' => LoginController::class,
'maintenance' => MaintenanceController::class,
'settings' => SettingsController::class,
'upgrade' => UpgradeController::class,
'environment' => EnvironmentController::class,
]

Definition at line 59 of file Maintenance.php.