forked from wallabag/wallabag
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:
committed by
Guillaume Virlet
parent
8ae45e7fe2
commit
c86b40f014
@ -543,6 +543,8 @@ class Poche
|
|||||||
Tools::redirect($referer);
|
Tools::redirect($referer);
|
||||||
}
|
}
|
||||||
$this->messages->add('e', _('login failed: bad login or password'));
|
$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::logm('login failed');
|
||||||
Tools::redirect();
|
Tools::redirect();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user