add message in web server log in case of authentication failure to enable the usage of fail2ban on failed login attempts

This commit is contained in:
Guillaume Virlet 2014-05-14 15:45:52 +02:00 committed by Guillaume Virlet
parent 8ae45e7fe2
commit c86b40f014

View file

@ -543,6 +543,8 @@ class Poche
Tools::redirect($referer);
}
$this->messages->add('e', _('login failed: bad login or password'));
// log login failure in web server log to allow fail2ban usage
error_log('user '.$login.' authentication failure');
Tools::logm('login failed');
Tools::redirect();
}