49 $this->loadBaseExtensions();
50 $this->initializeObjectManager();
54 $this->outputInstallToolNotEnabledMessageIfNeeded();
55 $this->outputInstallToolPasswordNotSetMessageIfNeeded();
56 $this->initializeSession();
57 $this->checkSessionToken();
59 $this->logoutIfRequested();
60 $this->loginIfRequested();
63 $this->dispatchAuthenticationActions();
71 protected function logoutIfRequested() {
73 if ($action ===
'logout') {
80 'TYPO3\\CMS\\Core\\FormProtection\\InstallToolFormProtection' 82 $formProtection->clean();
83 $this->session->destroySession();
96 register_shutdown_function(
function() {
97 $error = error_get_last();
98 if ($error !== NULL) {
99 $errorType = $error[
"type"];
101 if ($errorType & (E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR |
E_USER_ERROR | E_RECOVERABLE_ERROR)) {
107 $context =
'install[context]=standalone';
108 if (isset($getPostValues[
'context']) && $getPostValues[
'context'] ===
'backend') {
109 $context =
'install[context]=backend';
120 $errorEncoded = json_encode($error);
121 $parameters[] =
'install[lastError]=' . rawurlencode($errorEncoded);
123 $parameters[] =
'install[lastErrorHash]=' . hash_hmac(
'sha1', $errorEncoded,
$GLOBALS[
'TYPO3_CONF_VARS'][
'SYS'][
'encryptionKey'] .
'InstallToolError');
125 $redirectLocation =
'Install.php?' . implode(
'&',
$parameters);
127 if (!headers_sent()) {
130 \
TYPO3\CMS\Core\Utility\HttpUtility::HTTP_STATUS_303
135 The system detected a fatal error during script execution. 136 Please use the <a href="' . $redirectLocation .
'">extension check tool</a> to find incompatible extensions. 151 $lastError = array();
152 if (isset($getVars[
'lastError']) && isset($getVars[
'lastErrorHash']) && !empty(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SYS'][
'encryptionKey'])) {
153 $calculatedHash = hash_hmac(
'sha1', $getVars[
'lastError'],
$GLOBALS[
'TYPO3_CONF_VARS'][
'SYS'][
'encryptionKey'] .
'InstallToolError');
154 if ($calculatedHash === $getVars[
'lastErrorHash']) {
155 $lastError = json_decode($getVars[
'lastError'], TRUE);
167 protected function dispatchAuthenticationActions() {
169 if ($action ===
'') {
173 $actionClass = ucfirst($action);
175 $toolAction = $this->objectManager->get(
'TYPO3\\CMS\\Install\\Controller\\Action\\Tool\\' . $actionClass);
176 if (!($toolAction instanceof Action\ActionInterface)) {
178 $action .
' does not implement ActionInterface',
182 $toolAction->setController(
'tool');
183 $toolAction->setAction($action);
184 $toolAction->setToken($this->generateTokenForAction($action));
187 $this->
output($toolAction->handle());
static isInstallToolEnableFilePermanent()
if(!defined('ADODB_ERROR_HANDLER_TYPE')) define('ADODB_ERROR_HANDLER_TYPE' E_USER_ERROR
static removeInstallToolEnableFile()
outputLoginFormIfNotAuthorized()
redirect($controller='', $action='')
validateAuthenticationAction($action)
static redirect($url, $httpStatus=self::HTTP_STATUS_303)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]