summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorAxel Roenn <axel@mpim-bonn.mpg.de>2013-09-10 11:07:26 +0200
committerAxel Roenn <axel@mpim-bonn.mpg.de>2013-09-10 11:07:26 +0200
commit7810e27dad3c67f310657d1b19db71e0e4f94631 (patch)
tree677120111c7096e90f0cade9f3b58995d87cb424 /lib/base.php
parent0cd6473909e3db54cb69df4de96ef8409b41e515 (diff)
downloadnextcloud-server-7810e27dad3c67f310657d1b19db71e0e4f94631.tar.gz
nextcloud-server-7810e27dad3c67f310657d1b19db71e0e4f94631.zip
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 .
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/base.php b/lib/base.php
index 052444271c3..e8a4d3f87ad 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -730,8 +730,14 @@ 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);
+ if ( OC_Config::getValue('log_authfailip', '') ) {
+ 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));