From: Kunal Mehta Date: Sat, 20 Oct 2018 12:35:22 +0000 (-0700) Subject: Include IP address in "Login for $1 succeeded" log entry X-Git-Tag: 1.31.2~81 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=e62a8361d75344ab15e8def60cb7f2c6c4db2adb Include IP address in "Login for $1 succeeded" log entry Bug: T207540 Change-Id: Iab4f2f2ddc8e64ead2f33356d03fa7beed399415 --- diff --git a/RELEASE-NOTES-1.31 b/RELEASE-NOTES-1.31 index 9308a92d21..e8c384abca 100644 --- a/RELEASE-NOTES-1.31 +++ b/RELEASE-NOTES-1.31 @@ -14,6 +14,7 @@ THIS IS NOT A RELEASE YET * (T206979) Fix PHP 7.3 warnings of using "compact()" when some variables may not be set. * Fix PHP 7.3 warnings "preg_replace(): [...] invalid range in character class" +* (T207540) Include IP address in "Login for $1 succeeded" log entry. == MediaWiki 1.31.1 == diff --git a/includes/auth/AuthManager.php b/includes/auth/AuthManager.php index 9ed6d13a26..611a8cdc3a 100644 --- a/includes/auth/AuthManager.php +++ b/includes/auth/AuthManager.php @@ -681,8 +681,9 @@ class AuthManager implements LoggerAwareInterface { // Step 4: Authentication complete! Set the user in the session and // clean up. - $this->logger->info( 'Login for {user} succeeded', [ + $this->logger->info( 'Login for {user} succeeded from {clientip}', [ 'user' => $user->getName(), + 'clientip' => $this->request->getIP(), ] ); /** @var RememberMeAuthenticationRequest $req */ $req = AuthenticationRequest::getRequestByClass(