aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuillaume Virlet <github@virlet.org>2014-05-14 15:45:52 +0200
committerGuillaume Virlet <gvt@3ds.com>2015-01-05 10:21:04 +0100
commitc86b40f014848b2f9ccf4dfbead71694a41be569 (patch)
tree790a72948b8a489cc36a117a6c3628877da3d0f0
parent8ae45e7fe27ab416cf2a30cd2c319940037b7cbf (diff)
downloadwallabag-c86b40f014848b2f9ccf4dfbead71694a41be569.tar.gz
wallabag-c86b40f014848b2f9ccf4dfbead71694a41be569.tar.zst
wallabag-c86b40f014848b2f9ccf4dfbead71694a41be569.zip
add message in web server log in case of authentication failure to enable the usage of fail2ban on failed login attempts
-rwxr-xr-xinc/poche/Poche.class.php2
1 files changed, 2 insertions, 0 deletions
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
543 Tools::redirect($referer); 543 Tools::redirect($referer);
544 } 544 }
545 $this->messages->add('e', _('login failed: bad login or password')); 545 $this->messages->add('e', _('login failed: bad login or password'));
546 // log login failure in web server log to allow fail2ban usage
547 error_log('user '.$login.' authentication failure');
546 Tools::logm('login failed'); 548 Tools::logm('login failed');
547 Tools::redirect(); 549 Tools::redirect();
548 } 550 }