diff --git a/typo3/sysext/core/Classes/Core/Bootstrap.php b/typo3/sysext/core/Classes/Core/Bootstrap.php index 1923f23ca5d57932e070acc556c9b10ac41250c6..8853b4ec3d8dff1f73d84c02ca417f11a88a1255 100644 --- a/typo3/sysext/core/Classes/Core/Bootstrap.php +++ b/typo3/sysext/core/Classes/Core/Bootstrap.php @@ -173,7 +173,12 @@ class Bootstrap ->setFinalCachingFrameworkCacheConfiguration() ->unsetReservedGlobalVariables() ->loadBaseTca(); - + if (empty($GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'])) { + throw new \RuntimeException( + 'TYPO3 Encryption is empty. $GLOBALS[\'TYPO3_CONF_VARS\'][\'SYS\'][\'encryptionKey\'] needs to be set for TYPO3 to work securely', + 1502987245 + ); + } return $this; } diff --git a/typo3/sysext/lang/Resources/Private/Language/locallang_core.xlf b/typo3/sysext/lang/Resources/Private/Language/locallang_core.xlf index 4b98c4759f3e9518f11befaadb6d2fcd9eb3f23b..be72997ddefb55aec41694e17cd3c56fd3835a96 100644 --- a/typo3/sysext/lang/Resources/Private/Language/locallang_core.xlf +++ b/typo3/sysext/lang/Resources/Private/Language/locallang_core.xlf @@ -1162,9 +1162,6 @@ Do you want to refresh it now?</source> <trans-unit id="warning.install_trustedhosts"> <source>The trusted hosts pattern check is disabled. Please define the allowed hosts in the [SYS][trustedHostsPattern] section of the Install Tool.</source> </trans-unit> - <trans-unit id="warning.install_encryption"> - <source>The encryption key is not set. Set it in the %sBasic Configuration section%s of the Install Tool.</source> - </trans-unit> <trans-unit id="warning.install_update"> <source>This installation is not configured for the TYPO3 version it is running. If you did so intentionally, this message can be safely ignored. If you are unsure, visit the Update Wizard section of the %sInstall Tool%s to see how TYPO3 would change.</source> </trans-unit> diff --git a/typo3/sysext/reports/Classes/Report/Status/SecurityStatus.php b/typo3/sysext/reports/Classes/Report/Status/SecurityStatus.php index 12cd42994bcda61bc2e5a5099e7bd48f912c00a7..d48b5ab8031e8fa4bb7ee3cedcbe1a49b331c958 100644 --- a/typo3/sysext/reports/Classes/Report/Status/SecurityStatus.php +++ b/typo3/sysext/reports/Classes/Report/Status/SecurityStatus.php @@ -42,7 +42,6 @@ class SecurityStatus implements StatusProviderInterface $statuses = [ 'trustedHostsPattern' => $this->getTrustedHostsPatternStatus(), 'adminUserAccount' => $this->getAdminAccountStatus(), - 'encryptionKeyEmpty' => $this->getEncryptionKeyStatus(), 'fileDenyPattern' => $this->getFileDenyPatternStatus(), 'htaccessUpload' => $this->getHtaccessUploadStatus(), 'saltedpasswords' => $this->getSaltedPasswordsStatus(), @@ -129,29 +128,6 @@ class SecurityStatus implements StatusProviderInterface return GeneralUtility::makeInstance(ReportStatus::class, $this->getLanguageService()->getLL('status_adminUserAccount'), $value, $message, $severity); } - /** - * Checks whether the encryption key is empty. - * - * @return \TYPO3\CMS\Reports\Status An object representing whether the encryption key is empty or not - */ - protected function getEncryptionKeyStatus() - { - $value = $this->getLanguageService()->getLL('status_ok'); - $message = ''; - $severity = ReportStatus::OK; - if (empty($GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'])) { - $value = $this->getLanguageService()->getLL('status_insecure'); - $severity = ReportStatus::ERROR; - $url = 'install/index.php?redirect_url=index.php' . urlencode('?TYPO3_INSTALL[type]=config#set_encryptionKey'); - $message = sprintf( - $this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:warning.install_encryption'), - '<a href="' . $url . '">', - '</a>' - ); - } - return GeneralUtility::makeInstance(ReportStatus::class, $this->getLanguageService()->getLL('status_encryptionKey'), $value, $message, $severity); - } - /** * Checks if fileDenyPattern was changed which is dangerous on Apache *