Actions
Bug #96230
closedLogin Failure Warning Email : missing RemoteAdress and siteURL
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2021-12-03
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
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
Actions