summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-10-16 15:45:55 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2013-10-16 15:45:55 +0200
commitfdeef5e874ae7a8e4a23a737e5a1e948804d768a (patch)
tree2cc093162b583210b8f878f5ab9d670c270cff2e /lib/base.php
parent60541358ac375652d74e4a5b5d8cad865833aa92 (diff)
parentc3f7d22adc59949ad41c33d450b6d3e226cdefdb (diff)
downloadnextcloud-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.php10
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));