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

Closes #8941
Add remote IP address to warning on form login
This commit is contained in:
Jeremy Nguyen
2026-07-24 08:47:00 -07:00
committed by GitHub
parent 5b988957a2
commit a8a4264af2

View File

@@ -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'));