Commit 816e7e43 authored by maddinxx's avatar maddinxx

fail2ban compatible login log (no permissions for...

fail2ban compatible login log (no permissions for /var/log/ispconfig/login.log) - to be fixed! (FS#2244)
parent 996bad95
......@@ -78,6 +78,7 @@ class login_index {
$passwort = $app->db->quote($_POST['passwort']);
$loginAs = false;
$time = time();
$logging = 'Failed login for user '. $username .' from '. long2ip($ip) .' at '. date('Y-m-d H:i:s');
if($username != '' && $passwort != '' && $error == '') {
/*
......@@ -225,6 +226,9 @@ class login_index {
if($app->db->errorMessage != '') $error .= '<br />'.$app->db->errorMessage != '';
$app->plugin->raiseEvent('login_failed',$this);
//* write to log (e.g. for fail2ban)
exec('echo '. $logging .' >> /tmp/login.log');
}
}
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment