Issue Bug Closed

#96230Login Failure Warning Email : missing RemoteAdress and siteURL

RVVN no-lastname-given 12/03/21, 16:13 updated 07/06/23, 11:43

Description

Hi,

the fluid email we receive after some failed login attempts at backend is missing 2 informations :

  • remoteAdress
  • siteURL
There have been some attempts (4) to login at the TYPO3 site "Crespin" (). 

This is a dump of the failures:
02-12-21 13:20: Login-attempt from XXX.XXX.XXX.XXX, username 'johndoe' not found!!
02-12-21 13:21: Login-attempt from XXX.XXX.XXX.XXX, username 'johndoe', password not accepted!
02-12-21 13:24: Login-attempt from XXX.XXX.XXX.XXX, username 'johndoe', password not accepted!
02-12-21 13:26: Login-attempt from XXX.XXX.XXX.XXX, username 'johndoe', password not accepted!

This email was sent by Crespin from URL: - Please contact your site administrator if you feel you received this email by accident.

Some code inspection and debug lead me to an empty value for $GLOBALS[‘TYPO3_REQUEST’]

The issue doesn’t occur with the Login Warning email, so I mimicked the code and tried this workaround in typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php :

2483         /*if ($GLOBALS['TYPO3_REQUEST'] instanceof ServerRequestInterface)      {
2484             $email->setRequest($GLOBALS['TYPO3_REQUEST']);
2485         }*/
2486         $email->setRequest($GLOBALS['TYPO3_REQUEST'] ?? \TYPO3\CMS\Core\Http\ServerRequestFactory::fromGlobals()); //RVVN

Reviews 1