diff options
author | Guillaume Virlet <github@virlet.org> | 2014-05-14 15:45:52 +0200 |
---|---|---|
committer | Guillaume Virlet <gvt@3ds.com> | 2015-01-05 10:21:04 +0100 |
commit | c86b40f014848b2f9ccf4dfbead71694a41be569 (patch) | |
tree | 790a72948b8a489cc36a117a6c3628877da3d0f0 /inc/poche | |
parent | 8ae45e7fe27ab416cf2a30cd2c319940037b7cbf (diff) | |
download | wallabag-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
Diffstat (limited to 'inc/poche')
-rwxr-xr-x | inc/poche/Poche.class.php | 2 |
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 | } |