mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-07-30 00:36:58 -04:00
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:
@@ -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'));
|
||||
|
||||
Reference in New Issue
Block a user