mirror of
https://github.com/nextcloud/server.git
synced 2024-08-31 05:58:34 +02:00
Merge pull request #4780 from AxelRb/master
On an auth failure the uid and the IP address should be logged to the st...
This commit is contained in:
commit
0641365a10
@ -148,6 +148,9 @@ $CONFIG = array(
|
|||||||
(watch out, this option can increase the size of your log file)*/
|
(watch out, this option can increase the size of your log file)*/
|
||||||
"log_query" => false,
|
"log_query" => false,
|
||||||
|
|
||||||
|
/* Enable or disable the logging of IP addresses in case of webform auth failures */
|
||||||
|
"log_authfailip" => false,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Configure the size in bytes log rotation should happen, 0 or false disables the rotation.
|
* Configure the size in bytes log rotation should happen, 0 or false disables the rotation.
|
||||||
* This rotates the current owncloud logfile to a new name, this way the total log usage
|
* This rotates the current owncloud logfile to a new name, this way the total log usage
|
||||||
|
@ -760,6 +760,13 @@ class OC {
|
|||||||
// logon via web form
|
// logon via web form
|
||||||
elseif (OC::tryFormLogin()) {
|
elseif (OC::tryFormLogin()) {
|
||||||
$error[] = 'invalidpassword';
|
$error[] = 'invalidpassword';
|
||||||
|
if ( OC_Config::getValue('log_authfailip', false) ) {
|
||||||
|
OC_Log::write('core', 'Login failed: user \''.$_POST["user"].'\' , wrong password, IP:'.$_SERVER['REMOTE_ADDR'],
|
||||||
|
OC_Log::WARN);
|
||||||
|
} else {
|
||||||
|
OC_Log::write('core', 'Login failed: user \''.$_POST["user"].'\' , wrong password, IP:set log_authfailip=true in conf',
|
||||||
|
OC_Log::WARN);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
OC_Util::displayLoginPage(array_unique($error));
|
OC_Util::displayLoginPage(array_unique($error));
|
||||||
|
Loading…
Reference in New Issue
Block a user