diff options
-rw-r--r-- | apps/files_sharing/ajax/external.php | 2 | ||||
-rwxr-xr-x | config/config.sample.php | 3 | ||||
-rw-r--r-- | lib/base.php | 7 | ||||
-rw-r--r-- | lib/private/user/manager.php | 5 |
4 files changed, 6 insertions, 11 deletions
diff --git a/apps/files_sharing/ajax/external.php b/apps/files_sharing/ajax/external.php index 390d5bfb9d8..37d0607cd3f 100644 --- a/apps/files_sharing/ajax/external.php +++ b/apps/files_sharing/ajax/external.php @@ -35,7 +35,7 @@ $name = OCP\Files::buildNotExistingFileName('/', $name); // check for ssl cert if (substr($remote, 0, 5) === 'https' and !OC_Util::getUrlContent($remote)) { - \OCP\JSON::error(array('data' => array('message' => $l->t("Invalid or untrusted ssl certificate")))); + \OCP\JSON::error(array('data' => array('message' => $l->t("Invalid or untrusted SSL certificate")))); exit; } else { $mount = $externalManager->addShare($remote, $token, $password, $name, $owner); diff --git a/config/config.sample.php b/config/config.sample.php index 1cf2c22866a..402c84fe0c7 100755 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -185,9 +185,6 @@ $CONFIG = array( (watch out, this option can increase the size of your log file)*/ "log_query" => false, -/* Enable or disable the logging of IP addresses in case of webform auth failures */ -"log_authfailip" => false, - /* Whether ownCloud should log the last successfull cron exec */ "cron_log" => true, diff --git a/lib/base.php b/lib/base.php index c3384fbeeea..1f3c616fb18 100644 --- a/lib/base.php +++ b/lib/base.php @@ -849,13 +849,6 @@ 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)); diff --git a/lib/private/user/manager.php b/lib/private/user/manager.php index d4d91163003..a54755e71c5 100644 --- a/lib/private/user/manager.php +++ b/lib/private/user/manager.php @@ -164,6 +164,11 @@ class Manager extends PublicEmitter implements IUserManager { } } } + + $remoteAddr = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : ''; + $forwardedFor = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : ''; + + \OC::$server->getLogger()->warning('Login failed: \''. $loginname .'\' (Remote IP: \''. $remoteAddr .'\', X-Forwarded-For: \''. $forwardedFor .'\')', array('app' => 'core')); return false; } |