diff options
author | Morris Jobke <morris.jobke@gmail.com> | 2013-10-10 07:21:36 -0700 |
---|---|---|
committer | Morris Jobke <morris.jobke@gmail.com> | 2013-10-10 07:21:36 -0700 |
commit | 0641365a1033b3e6b926a5e280f3bd2559e2ea23 (patch) | |
tree | 67012ff08995eab93dda9cc9147086bb1bf6d6c3 /lib | |
parent | 4c166fa361089f351b75a1ab92db327faf5d1a88 (diff) | |
parent | 9b0454380ccef34368a0a5227857788877722085 (diff) | |
download | nextcloud-server-0641365a1033b3e6b926a5e280f3bd2559e2ea23.tar.gz nextcloud-server-0641365a1033b3e6b926a5e280f3bd2559e2ea23.zip |
Merge pull request #4780 from AxelRb/master
On an auth failure the uid and the IP address should be logged to the st...
Diffstat (limited to 'lib')
-rw-r--r-- | lib/base.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php index b0b2dca502f..ff4ca588213 100644 --- a/lib/base.php +++ b/lib/base.php @@ -760,6 +760,13 @@ class OC { // logon via web form elseif (OC::tryFormLogin()) { $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)); |