From c86b40f014848b2f9ccf4dfbead71694a41be569 Mon Sep 17 00:00:00 2001 From: Guillaume Virlet Date: Wed, 14 May 2014 15:45:52 +0200 Subject: [PATCH] add message in web server log in case of authentication failure to enable the usage of fail2ban on failed login attempts --- inc/poche/Poche.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index a29cb327..75766919 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -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(); } -- 2.41.0