LOGINFAILED LOG
Se aumento 'date' para el registro del log en la clase Logger (class.logger.php) y se quito el date en los mensajes enviados a dicha clase. Cuando el usuario falla 3 veces consecutivas el logeo, se crea si no existiese, el file shared/log/loginFailed.log y se agrega un nuevo registro con los siguientes datos: 2014-07-02 16:55:22 | Many failed authentication attempts for USER: admin | IP: 192.168.10.109 | WS: dmuz | Browser: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36
This commit is contained in:
@@ -912,7 +912,7 @@ function saveLog($sSource, $sType, $sDescription)
|
||||
}
|
||||
|
||||
G::verifyPath(PATH_DATA . "log" . PATH_SEP, true);
|
||||
G::log(date("Y-m-d H:i:s") . " | $sObject | " . $sSource . " | $sType | " . $sDescription . "\n", PATH_DATA);
|
||||
G::log(" | $sObject | " . $sSource . " | $sType | " . $sDescription . "\n", PATH_DATA);
|
||||
} catch (Exception $e) {
|
||||
//CONTINUE
|
||||
}
|
||||
|
||||
@@ -338,7 +338,7 @@ function saveLog($sSource, $sType, $sDescription)
|
||||
print date ('H:i:s') . " ($sSource) $sType $sDescription <br>\n";
|
||||
|
||||
G::verifyPath (PATH_DATA . 'log' . PATH_SEP, true);
|
||||
$message = date ('Y-m-d H:i:s') . '(' . $sSource . ') ' . $sDescription . "\n";
|
||||
$message = '(' . $sSource . ') ' . $sDescription . "\n";
|
||||
if ($sType == 'action') {
|
||||
G::log($message, PATH_DATA);
|
||||
}
|
||||
|
||||
@@ -517,7 +517,7 @@ function saveLog($sSource, $sType, $sDescription)
|
||||
print date ('H:i:s') . " ($sSource) $sType $sDescription <br>\n";
|
||||
|
||||
G::verifyPath (PATH_DATA . 'log' . PATH_SEP, true);
|
||||
$message = date ('Y-m-d H:i:s') . '(' . $sSource . ') ' . $sDescription . "\n";
|
||||
$message = '(' . $sSource . ') ' . $sDescription . "\n";
|
||||
if ($sType == 'action') {
|
||||
G::log($message, PATH_DATA);
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ try {
|
||||
if (isset($_SESSION['__AUTH_ERROR__'])) {
|
||||
G::SendMessageText($_SESSION['__AUTH_ERROR__'], "warning");
|
||||
unset($_SESSION['__AUTH_ERROR__']);
|
||||
}
|
||||
}
|
||||
break;
|
||||
//The user is inactive
|
||||
case -3:
|
||||
@@ -139,7 +139,7 @@ try {
|
||||
$browser = $_SERVER['HTTP_USER_AGENT'];
|
||||
|
||||
$path = PATH_DATA;
|
||||
$message = date('Y-m-d H:i:s'). " | Many failed authentication attempts for USER: " . $usr . " | IP: " . $ip . " | WS: " . SYS_SYS . " | Browser: " .$browser ." \n" ;
|
||||
$message = " | Many failed authentication attempts for USER: " . $usr . " | IP: " . $ip . " | WS: " . SYS_SYS . " | BROWSER: " .$browser ." \n" ;
|
||||
$file = "loginFailed.log";
|
||||
|
||||
G::log($message, $path, $file);
|
||||
|
||||
Reference in New Issue
Block a user