PHP authentication failure: log straight to error log

master
Michael Kuron 2017-05-25 15:36:44 +02:00
parent 1906c26e5d
commit de8ec199fa
1 changed files with 1 additions and 5 deletions

View File

@ -169,11 +169,7 @@ function check_login($user, $pass) {
}
elseif (!isset($_SESSION['mailcow_cc_username'])) {
$_SESSION['ldelay'] = $_SESSION['ldelay']+0.5;
$err = error_reporting(E_ALL);
ini_set('display_errors', 'off');
trigger_error("Mailcow UI: Invalid password for " . $user . " by " . $_SERVER['REMOTE_ADDR'], E_USER_WARNING);
ini_set('display_errors', 'on');
error_reporting($err);
error_log("Mailcow UI: Invalid password for " . $user . " by " . $_SERVER['REMOTE_ADDR']);
}
sleep($_SESSION['ldelay']);
}