Skip to content

A free, self-hostable news aggregator…

Add remote IP address to warning on form login (#8942)

Jeremy Nguyena8a4264af291
diff --git a/app/Controllers/authController.php b/app/Controllers/authController.php
index 88e81a902..d279d15bd 100644
--- a/app/Controllers/authController.php
+++ b/app/Controllers/authController.php
@@ -120,9 +120,10 @@ class FreshRSS_auth_Controller extends FreshRSS_ActionController {
$nonce = Minz_Session::paramString('nonce');
$username = Minz_Request::paramString('username');
$challenge = Minz_Request::paramString('challenge');
+ $ip_address = Minz_Request::connectionRemoteAddress();
if ($nonce === '') {
- Minz_Log::warning("Invalid session during login for user={$username}, nonce={$nonce}");
+ Minz_Log::warning("Invalid session during login for user={$username}, nonce={$nonce}, ip_address={$ip_address}");
header('HTTP/1.1 403 Forbidden');
Minz_Session::_param('POST_to_GET', true); //Prevent infinite internal redirect
Minz_Request::setBadNotification(_t('install.session.nok'));
@@ -181,7 +182,7 @@ class FreshRSS_auth_Controller extends FreshRSS_ActionController {
showNotification: FreshRSS_Context::userConf()->good_notification_timeout > 0
);
} else {
- Minz_Log::warning("Password mismatch for user={$username}, nonce={$nonce}, c={$challenge}");
+ Minz_Log::warning("Password mismatch for user={$username}, nonce={$nonce}, c={$challenge}, ip_address={$ip_address}");
header('HTTP/1.1 403 Forbidden');
Minz_Session::_param('POST_to_GET', true); //Prevent infinite internal redirect
Minz_Request::setBadNotification(_t('feedback.auth.login.invalid'));