diff --git a/typo3/sysext/backend/Classes/Controller/LoginController.php b/typo3/sysext/backend/Classes/Controller/LoginController.php index 1e00ffc7774e..8dbe2f08f841 100644 --- a/typo3/sysext/backend/Classes/Controller/LoginController.php +++ b/typo3/sysext/backend/Classes/Controller/LoginController.php @@ -415,9 +415,6 @@ public function checkRedirect() { } '); } - } elseif (empty($GLOBALS['BE_USER']->user['uid']) && $this->isLoginInProgress()) { - // Wrong password, wait for 5 seconds - sleep(5); } } diff --git a/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php b/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php index c4ce61e75eff..827bbd9c0c5b 100644 --- a/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php +++ b/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php @@ -857,6 +857,21 @@ public function checkAuthentication() { if ($this->writeDevLog) { GeneralUtility::devLog('Call checkLogFailures: ' . GeneralUtility::arrayToLogString(array('warningEmail' => $this->warningEmail, 'warningPeriod' => $this->warningPeriod, 'warningMax' => $this->warningMax)), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', -1); } + + // Hook to implement login failure tracking methods + if ( + !empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['postLoginFailureProcessing']) + && is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['postLoginFailureProcessing']) + ) { + $_params = array(); + foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['postLoginFailureProcessing'] as $_funcRef) { + GeneralUtility::callUserFunction($_funcRef, $_params, $this); + } + } else { + // If no hook is implemented, wait for 5 seconds + sleep(5); + } + $this->checkLogFailures($this->warningEmail, $this->warningPeriod, $this->warningMax); } }