]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Merge pull request #690 from doc75/log_auth_error
authorNicolas Lœuillet <nicolas@loeuillet.org>
Fri, 16 Jan 2015 19:06:57 +0000 (20:06 +0100)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Fri, 16 Jan 2015 19:06:57 +0000 (20:06 +0100)
Add message in web server log in case of authentication failure

inc/poche/Poche.class.php

index 6a742019fbbd03d111685a1dce13acdc07e1eb7d..8b0d3a19fad82d1a828772a82d88e591a98689f1 100755 (executable)
@@ -576,6 +576,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();
         }