diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-16 15:45:55 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-16 15:45:55 +0200 |
commit | fdeef5e874ae7a8e4a23a737e5a1e948804d768a (patch) | |
tree | 2cc093162b583210b8f878f5ab9d670c270cff2e /lib/base.php | |
parent | 60541358ac375652d74e4a5b5d8cad865833aa92 (diff) | |
parent | c3f7d22adc59949ad41c33d450b6d3e226cdefdb (diff) | |
download | nextcloud-server-fdeef5e874ae7a8e4a23a737e5a1e948804d768a.tar.gz nextcloud-server-fdeef5e874ae7a8e4a23a737e5a1e948804d768a.zip |
Merge branch 'master' into fixing-appframework-master
Conflicts:
lib/private/appframework/middleware/security/securitymiddleware.php
tests/lib/appframework/middleware/security/SecurityMiddlewareTest.php
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/base.php b/lib/base.php index 7299a012da9..7bebb5f93a0 100644 --- a/lib/base.php +++ b/lib/base.php @@ -305,9 +305,8 @@ class OC { self::$session = new \OC\Session\Internal(OC_Util::getInstanceId()); // if session cant be started break with http 500 error } catch (Exception $e) { - OC_Log::write('core', 'Session could not be initialized', + OC_Log::write('core', 'Session could not be initialized. Exception message: '.$e->getMessage(), OC_Log::ERROR); - header('HTTP/1.1 500 Internal Server Error'); OC_Util::addStyle("styles"); $error = 'Session could not be initialized. Please contact your '; @@ -764,6 +763,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)); |