On an auth failure the uid and the IP address should be logged to the standard log file.

This update works for a standard setup, when using a proxy for the server one can probably use the X-forwarded-for header
  instead of the remote address.
This commit is contained in:
Axel Roenn 2013-09-09 15:35:39 +02:00
parent 92f6c3bb10
commit 0cd6473909
1 changed files with 2 additions and 0 deletions

View File

@ -730,6 +730,8 @@ class OC {
// Someone wants to log in :
} elseif (OC::tryFormLogin()) {
$error[] = 'invalidpassword';
OC_Log::write('core', 'Login failed: user \''.$_POST["user"].'\' , wrong password, IP:'.$_SERVER['REMOTE_ADDR'],
OC_Log::ERROR);
}
OC_Util::displayLoginPage(array_unique($error));