diff --git a/typo3/sysext/backend/Classes/Controller/BackendController.php b/typo3/sysext/backend/Classes/Controller/BackendController.php index ca1164a1e816a7070b511ee0e0f12c087dfb6ca7..3b8b489a329bf9569aab79c72f4b75f3b0723cab 100644 --- a/typo3/sysext/backend/Classes/Controller/BackendController.php +++ b/typo3/sysext/backend/Classes/Controller/BackendController.php @@ -32,7 +32,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\MathUtility; use TYPO3\CMS\Core\Utility\PathUtility; use TYPO3\CMS\Fluid\View\StandaloneView; -use TYPO3\CMS\Rsaauth\RsaEncryptionEncoder; /** * Class for rendering the TYPO3 backend @@ -163,10 +162,6 @@ class BackendController // load debug console $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/DebugConsole'); - // Load RSA encryption - $rsaEncryptionEncoder = GeneralUtility::makeInstance(RsaEncryptionEncoder::class); - $rsaEncryptionEncoder->enableRsaEncryption(true); - $this->pageRenderer->addInlineSetting('ShowItem', 'moduleUrl', BackendUtility::getModuleUrl('show_item')); $this->css = ''; diff --git a/typo3/sysext/rsaauth/Classes/RsaEncryptionEncoder.php b/typo3/sysext/rsaauth/Classes/RsaEncryptionEncoder.php index 434e52ee2599c9625830099301a9594490af5f0e..2b259fce6f4f3d72b0e90224013d4f7a7f4e103b 100644 --- a/typo3/sysext/rsaauth/Classes/RsaEncryptionEncoder.php +++ b/typo3/sysext/rsaauth/Classes/RsaEncryptionEncoder.php @@ -36,6 +36,14 @@ class RsaEncryptionEncoder implements SingletonInterface */ protected $pageRenderer = null; + /** + * This method is called by the hook constructPostProcess + */ + public function enableEncryptionFromBackendControllerPostConstructor() + { + $this->enableRsaEncryption(true); + } + /** * Load all necessary Javascript files * diff --git a/typo3/sysext/rsaauth/ext_localconf.php b/typo3/sysext/rsaauth/ext_localconf.php index 63f04c8b349f356fdd40a4603b61ea01b2adb476..0a0d5b6e7d1a27984770d1faa7734d7ef801cebf 100644 --- a/typo3/sysext/rsaauth/ext_localconf.php +++ b/typo3/sysext/rsaauth/ext_localconf.php @@ -20,6 +20,7 @@ defined('TYPO3_MODE') or die(); // Add hook for user setup module $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/setup/mod/index.php']['setupScriptHook']['rsaauth'] = \TYPO3\CMS\Rsaauth\Hook\UserSetupHook::class . '->getLoginScripts'; $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/setup/mod/index.php']['modifyUserDataBeforeSave']['rsaauth'] = \TYPO3\CMS\Rsaauth\Hook\UserSetupHook::class . '->decryptPassword'; +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/backend.php']['constructPostProcess'][] = \TYPO3\CMS\Rsaauth\RsaEncryptionEncoder::class . '->enableEncryptionFromBackendControllerPostConstructor'; // Add a hook to the FE login form (felogin system extension) $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['felogin']['loginFormOnSubmitFuncs']['rsaauth'] = \TYPO3\CMS\Rsaauth\Hook\FrontendLoginHook::class . '->loginFormHook'; // Add a hook to show Backend warnings