Changed default behaviour to not log IP address in case of an auth failure. Can be configured in OC conf now.

Log level changed to warning .
remotes/origin/stable6
Axel Roenn 12 years ago
parent 0cd6473909
commit 7810e27dad
  1. 8
      lib/base.php

@ -730,8 +730,14 @@ class OC {
// Someone wants to log in :
} elseif (OC::tryFormLogin()) {
$error[] = 'invalidpassword';
if ( OC_Config::getValue('log_authfailip', '') ) {
OC_Log::write('core', 'Login failed: user \''.$_POST["user"].'\' , wrong password, IP:'.$_SERVER['REMOTE_ADDR'],
OC_Log::ERROR);
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));

Loading…
Cancel
Save